]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add SportInfo support for MLBSacFliesXML.dtd.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 18 Jun 2014 14:36:09 +0000 (10:36 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 18 Jun 2014 14:36:09 +0000 (10:36 -0400)
doc/man1/htsn-import.1
schema/MLBSacFliesXML.dtd [new file with mode: 0644]
schemagen/MLBSacFliesXML/MLBSacFliesXML.xml [new file with mode: 0644]
src/TSN/XML/SportInfo.hs
test/xml/sportinfo/MLBSacFliesXML.dtd [new file with mode: 0644]
test/xml/sportinfo/MLBSacFliesXML.xml [new file with mode: 0644]

index 963c9bd05ba8cce41e4057856088db3437b3d32e..e54f13ffb529c41e022dc57434c5924fde859261 100644 (file)
@@ -206,6 +206,8 @@ MLBPlateAppsXML.dtd
 mlbrbisxml.dtd
 .IP \[bu]
 mlbrunsleadersxml.dtd
+.IP \[bu]
+MLBSacFliesXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/MLBSacFliesXML.dtd b/schema/MLBSacFliesXML.dtd
new file mode 100644 (file)
index 0000000..1f6bbfa
--- /dev/null
@@ -0,0 +1,22 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , Listing+ , time_stamp )>\r
+\r
+<!ELEMENT XML_File_ID  (#PCDATA )>\r
+\r
+<!ELEMENT heading  (#PCDATA )>\r
+\r
+<!ELEMENT category  (#PCDATA )>\r
+\r
+<!ELEMENT sport  (#PCDATA )>\r
+\r
+<!ELEMENT title  (#PCDATA )>\r
+\r
+<!ELEMENT Listing  (Rank , Name , SacFlies )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Name  (#PCDATA )>\r
+\r
+<!ELEMENT SacFlies  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/MLBSacFliesXML/MLBSacFliesXML.xml b/schemagen/MLBSacFliesXML/MLBSacFliesXML.xml
new file mode 100644 (file)
index 0000000..b1ae3b3
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLBSacFliesXML.dtd">\r
+<message>\r
+<XML_File_ID>1917787</XML_File_ID>\r
+<heading>AAX%AL-SACRIFICEFLIES-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<title>2002 AL Sacrifice Flies Leaders</title>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Name>Joe Randa, KC</Name>\r
+<SacFlies>8</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>2</Rank>\r
+<Name>Omar Vizquel, CLE</Name>\r
+<SacFlies>7</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Conine, BAL</Name>\r
+<SacFlies>7</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Desi Relaford, SEA</Name>\r
+<SacFlies>7</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>5</Rank>\r
+<Name>Nomar Garciaparra, BOS</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>David Ortiz, MIN</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Cirillo, SEA</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>John Olerud, SEA</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>9</Rank>\r
+<Name>Garret Anderson, ANA</Name>\r
+<SacFlies>5</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jacque Jones, MIN</Name>\r
+<SacFlies>5</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Lee, SOX</Name>\r
+<SacFlies>5</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>12</Rank>\r
+<Name>Ben Molina, ANA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Johnny Damon, BOS</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Chris Singleton, BAL</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tony Batista, BAL</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Cristian Guzman, MIN</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Neifi Perez, KC</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mike Sweeney, KC</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ray Durham, SOX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Frank Thomas, SOX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Royce Clayton, SOX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ichiro Suzuki, SEA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mark McLemore, SEA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Rafael Palmeiro, TEX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Bobby Higginson, DET</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Wendell Magee Jr., DET</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Scott Spiezio, ANA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>28</Rank>\r
+<Name>Marty Cordova, BAL</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jim Thome, CLE</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>David Eckstein, ANA</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tim Salmon, ANA</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Troy Glaus, ANA</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Delgado, TOR</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Darrin Fletcher, TOR</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jose Offerman, BOS</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jorge Posada, NYY</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Rondell White, NYY</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Doug Mientkiewicz, MIN</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Torii Hunter, MIN</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Corey Koskie, MIN</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<time_stamp> June 27, 2002, at 11:52 AM ET </time_stamp>\r
+</message>\r
index 94093b1498135ab2c0548335e1484b5e522fe502..e6ad87199e7c3258535865fac0e63361d26a0cd8 100644 (file)
@@ -120,7 +120,7 @@ dtds =
     "MLBPlateAppsXML.dtd",
     "mlbrbisxml.dtd",
     "mlbrunsleadersxml.dtd",
-    "MLBSacFliesXML.dtd", -- no dtd
+    "MLBSacFliesXML.dtd",
     "MLBSacrificesXML.dtd", -- no dtd
     "MLBSBSuccessXML.dtd", -- no dtd
     "mlbsluggingpctxml.dtd", -- no dtd
@@ -364,7 +364,8 @@ sport_info_test_files =
     "MLBOPSXML.xml",
     "MLBPlateAppsXML.xml",
     "mlbrbisxml.xml",
-    "mlbrunsleadersxml.xml"
+    "mlbrunsleadersxml.xml",
+    "MLBSacFliesXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/MLBSacFliesXML.dtd b/test/xml/sportinfo/MLBSacFliesXML.dtd
new file mode 100644 (file)
index 0000000..1f6bbfa
--- /dev/null
@@ -0,0 +1,22 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , Listing+ , time_stamp )>\r
+\r
+<!ELEMENT XML_File_ID  (#PCDATA )>\r
+\r
+<!ELEMENT heading  (#PCDATA )>\r
+\r
+<!ELEMENT category  (#PCDATA )>\r
+\r
+<!ELEMENT sport  (#PCDATA )>\r
+\r
+<!ELEMENT title  (#PCDATA )>\r
+\r
+<!ELEMENT Listing  (Rank , Name , SacFlies )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Name  (#PCDATA )>\r
+\r
+<!ELEMENT SacFlies  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/MLBSacFliesXML.xml b/test/xml/sportinfo/MLBSacFliesXML.xml
new file mode 100644 (file)
index 0000000..b1ae3b3
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLBSacFliesXML.dtd">\r
+<message>\r
+<XML_File_ID>1917787</XML_File_ID>\r
+<heading>AAX%AL-SACRIFICEFLIES-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<title>2002 AL Sacrifice Flies Leaders</title>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Name>Joe Randa, KC</Name>\r
+<SacFlies>8</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>2</Rank>\r
+<Name>Omar Vizquel, CLE</Name>\r
+<SacFlies>7</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Conine, BAL</Name>\r
+<SacFlies>7</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Desi Relaford, SEA</Name>\r
+<SacFlies>7</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>5</Rank>\r
+<Name>Nomar Garciaparra, BOS</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>David Ortiz, MIN</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Cirillo, SEA</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>John Olerud, SEA</Name>\r
+<SacFlies>6</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>9</Rank>\r
+<Name>Garret Anderson, ANA</Name>\r
+<SacFlies>5</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jacque Jones, MIN</Name>\r
+<SacFlies>5</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Lee, SOX</Name>\r
+<SacFlies>5</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>12</Rank>\r
+<Name>Ben Molina, ANA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Johnny Damon, BOS</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Chris Singleton, BAL</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tony Batista, BAL</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Cristian Guzman, MIN</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Neifi Perez, KC</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mike Sweeney, KC</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ray Durham, SOX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Frank Thomas, SOX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Royce Clayton, SOX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ichiro Suzuki, SEA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mark McLemore, SEA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Rafael Palmeiro, TEX</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Bobby Higginson, DET</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Wendell Magee Jr., DET</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Scott Spiezio, ANA</Name>\r
+<SacFlies>4</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank>28</Rank>\r
+<Name>Marty Cordova, BAL</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jim Thome, CLE</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>David Eckstein, ANA</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tim Salmon, ANA</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Troy Glaus, ANA</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Delgado, TOR</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Darrin Fletcher, TOR</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jose Offerman, BOS</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jorge Posada, NYY</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Rondell White, NYY</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Doug Mientkiewicz, MIN</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Torii Hunter, MIN</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Corey Koskie, MIN</Name>\r
+<SacFlies>3</SacFlies>\r
+</Listing>\r
+<time_stamp> June 27, 2002, at 11:52 AM ET </time_stamp>\r
+</message>\r