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

index e54f13ffb529c41e022dc57434c5924fde859261..76fb54ea35cf9e3bc70b5900c2307bd91aea831e 100644 (file)
@@ -208,6 +208,8 @@ mlbrbisxml.dtd
 mlbrunsleadersxml.dtd
 .IP \[bu]
 MLBSacFliesXML.dtd
+.IP \[bu]
+MLBSacrificesXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/MLBSacrificesXML.dtd b/schema/MLBSacrificesXML.dtd
new file mode 100644 (file)
index 0000000..d42d91f
--- /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 , Sacrifices )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Name  (#PCDATA )>\r
+\r
+<!ELEMENT Sacrifices  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/MLBSacrificesXML/MLBSacrificesXML.xml b/schemagen/MLBSacrificesXML/MLBSacrificesXML.xml
new file mode 100644 (file)
index 0000000..1c4ce1d
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLBSacrificesXML.dtd">\r
+<message>\r
+<XML_File_ID>69196917</XML_File_ID>\r
+<heading>AAX%AL-SACRIFICEBUNTS-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<title>2002 AL Sacrifice Bunts Leaders</title>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Name>Ray Durham, SOX</Name>\r
+<Sacrifices>8</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Cirillo, SEA</Name>\r
+<Sacrifices>8</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>3</Rank>\r
+<Name>Gabe Kapler, TEX</Name>\r
+<Sacrifices>7</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>4</Rank>\r
+<Name>David Eckstein, ANA</Name>\r
+<Sacrifices>6</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Dan Wilson, SEA</Name>\r
+<Sacrifices>6</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Michael Young, TEX</Name>\r
+<Sacrifices>6</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>7</Rank>\r
+<Name>Mike Bordick, BAL</Name>\r
+<Sacrifices>5</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>8</Rank>\r
+<Name>Einar Diaz, CLE</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Adam Kennedy, ANA</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jerry Hairston, BAL</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Cristian Guzman, MIN</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Febles, KC</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jose Macias, DET</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>14</Rank>\r
+<Name>Brian Roberts, BAL</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ricky Gutierrez, CLE</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Denny Hocking, MIN</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Neifi Perez, KC</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Kenny Lofton, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Royce Clayton, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Brent Abernathy, TB</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mark L. Johnson, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Brook Fordyce, BAL</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Gary Matthews Jr, BAL</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tony Graffanino, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Alberto Castillo, NYY</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ramon Santiago, DET</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>27</Rank>\r
+<Name>Marty Cordova, BAL</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Enrique Wilson, NYY</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Calvin Murray, TEX</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Vernon Wells, TOR</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Felipe Lopez, TOR</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Shane Spencer, NYY</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Nick Johnson, NYY</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Chris Singleton, BAL</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Melvin Mora, BAL</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Michael Tucker, KC</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Joe Randa, KC</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ichiro Suzuki, SEA</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mark McLemore, SEA</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Frank Catalanotto, TEX</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<time_stamp> June 27, 2002, at 11:52 AM ET </time_stamp>\r
+</message>\r
index e6ad87199e7c3258535865fac0e63361d26a0cd8..8040d508197e2ad1de16191c5a2067702e721132 100644 (file)
@@ -121,7 +121,7 @@ dtds =
     "mlbrbisxml.dtd",
     "mlbrunsleadersxml.dtd",
     "MLBSacFliesXML.dtd",
-    "MLBSacrificesXML.dtd", -- no dtd
+    "MLBSacrificesXML.dtd",
     "MLBSBSuccessXML.dtd", -- no dtd
     "mlbsluggingpctxml.dtd", -- no dtd
     "mlbstandxml.dtd", -- no dtd
@@ -365,7 +365,8 @@ sport_info_test_files =
     "MLBPlateAppsXML.xml",
     "mlbrbisxml.xml",
     "mlbrunsleadersxml.xml",
-    "MLBSacFliesXML.xml"
+    "MLBSacFliesXML.xml",
+    "MLBSacrificesXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/MLBSacrificesXML.dtd b/test/xml/sportinfo/MLBSacrificesXML.dtd
new file mode 100644 (file)
index 0000000..d42d91f
--- /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 , Sacrifices )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Name  (#PCDATA )>\r
+\r
+<!ELEMENT Sacrifices  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/MLBSacrificesXML.xml b/test/xml/sportinfo/MLBSacrificesXML.xml
new file mode 100644 (file)
index 0000000..1c4ce1d
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLBSacrificesXML.dtd">\r
+<message>\r
+<XML_File_ID>69196917</XML_File_ID>\r
+<heading>AAX%AL-SACRIFICEBUNTS-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<title>2002 AL Sacrifice Bunts Leaders</title>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Name>Ray Durham, SOX</Name>\r
+<Sacrifices>8</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Cirillo, SEA</Name>\r
+<Sacrifices>8</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>3</Rank>\r
+<Name>Gabe Kapler, TEX</Name>\r
+<Sacrifices>7</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>4</Rank>\r
+<Name>David Eckstein, ANA</Name>\r
+<Sacrifices>6</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Dan Wilson, SEA</Name>\r
+<Sacrifices>6</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Michael Young, TEX</Name>\r
+<Sacrifices>6</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>7</Rank>\r
+<Name>Mike Bordick, BAL</Name>\r
+<Sacrifices>5</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>8</Rank>\r
+<Name>Einar Diaz, CLE</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Adam Kennedy, ANA</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jerry Hairston, BAL</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Cristian Guzman, MIN</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Febles, KC</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jose Macias, DET</Name>\r
+<Sacrifices>4</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>14</Rank>\r
+<Name>Brian Roberts, BAL</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ricky Gutierrez, CLE</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Denny Hocking, MIN</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Neifi Perez, KC</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Kenny Lofton, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Royce Clayton, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Brent Abernathy, TB</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mark L. Johnson, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Brook Fordyce, BAL</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Gary Matthews Jr, BAL</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tony Graffanino, SOX</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Alberto Castillo, NYY</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ramon Santiago, DET</Name>\r
+<Sacrifices>3</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank>27</Rank>\r
+<Name>Marty Cordova, BAL</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Enrique Wilson, NYY</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Calvin Murray, TEX</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Vernon Wells, TOR</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Felipe Lopez, TOR</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Shane Spencer, NYY</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Nick Johnson, NYY</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Chris Singleton, BAL</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Melvin Mora, BAL</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Michael Tucker, KC</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Joe Randa, KC</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ichiro Suzuki, SEA</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mark McLemore, SEA</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Frank Catalanotto, TEX</Name>\r
+<Sacrifices>2</Sacrifices>\r
+</Listing>\r
+<time_stamp> June 27, 2002, at 11:52 AM ET </time_stamp>\r
+</message>\r