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

index 2d4abd46eee97b63fcb38ec72a64127bcbf68e6c..71a8dad35e79c3c43d4c5efbad24970d067a7a66 100644 (file)
@@ -180,6 +180,8 @@ Minor_Baseball_Transactions_XML.dtd
 mlbbattingavgxml.dtd
 .IP \[bu]
 mlbdoublesleadersxml.dtd
+.IP \[bu]
+MLBGamesPlayedXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/MLBGamesPlayedXML.dtd b/schema/MLBGamesPlayedXML.dtd
new file mode 100644 (file)
index 0000000..45ec9cf
--- /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 , Games )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Name  (#PCDATA )>\r
+\r
+<!ELEMENT Games  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/MLBGamesPlayedXML/MLBGamesPlayedXML.xml b/schemagen/MLBGamesPlayedXML/MLBGamesPlayedXML.xml
new file mode 100644 (file)
index 0000000..2fb9831
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLBGamesPlayedXML.dtd">\r
+<message>\r
+<XML_File_ID>11191907</XML_File_ID>\r
+<heading>AAX%AL-GAMESPLAYED-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<title>2002 AL Games Played Leaders</title>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Name>Jim Thome, CLE</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Derek Jeter, NYY</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Torii Hunter, MIN</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Paul Konerko, SOX</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Alex Rodriguez, TEX</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Miguel Tejada, OAK</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Terrence Long, OAK</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>8</Rank>\r
+<Name>Garret Anderson, ANA</Name>\r
+<Games>76</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jason Giambi, NYY</Name>\r
+<Games>76</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>10</Rank>\r
+<Name>Omar Vizquel, CLE</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tony Batista, BAL</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jacque Jones, MIN</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Frank Thomas, SOX</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ichiro Suzuki, SEA</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mike Cameron, SEA</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>John Olerud, SEA</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>17</Rank>\r
+<Name>Matt Lawton, CLE</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tim Salmon, ANA</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Delgado, TOR</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jose Cruz, TOR</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Bernie Williams, NYY</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Neifi Perez, KC</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Beltran, KC</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Magglio Ordonez, SOX</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>25</Rank>\r
+<Name>Shea Hillenbrand, BOS</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Alfonso Soriano, NYY</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mike Sweeney, KC</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Bret Boone, SEA</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>29</Rank>\r
+<Name>Troy Glaus, ANA</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Raul Mondesi, TOR</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Vernon Wells, TOR</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Nick Johnson, NYY</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>33</Rank>\r
+<Name>Nomar Garciaparra, BOS</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Cristian Guzman, MIN</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Kenny Lofton, SOX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ray Durham, SOX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Royce Clayton, SOX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Cirillo, SEA</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Michael Young, TEX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Randy Winn, TB</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<time_stamp> June 27, 2002, at 11:51 AM ET </time_stamp>\r
+</message>\r
index 0ab896a420075d4542023e4ce57d96717988af21..0bae73fc2893a94ccbc28ee6b32d877da9948d5b 100644 (file)
@@ -107,7 +107,7 @@ dtds =
     "Minor_Baseball_Transactions_XML.dtd",
     "mlbbattingavgxml.dtd",
     "mlbdoublesleadersxml.dtd",
-    "MLBGamesPlayedXML.dtd", -- no dtd
+    "MLBGamesPlayedXML.dtd",
     "MLBGIDPXML.dtd", -- no dtd
     "MLBHitByPitchXML.dtd", -- no dtd
     "mlbhitsleadersxml.dtd", -- no dtd
@@ -351,7 +351,8 @@ sport_info_test_files =
     "Minor_Baseball_Standings_XML.xml",
     "Minor_Baseball_Transactions_XML.xml",
     "mlbbattingavgxml.xml",
-    "mlbdoublesleadersxml.xml"
+    "mlbdoublesleadersxml.xml",
+    "MLBGamesPlayedXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/MLBGamesPlayedXML.dtd b/test/xml/sportinfo/MLBGamesPlayedXML.dtd
new file mode 100644 (file)
index 0000000..45ec9cf
--- /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 , Games )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Name  (#PCDATA )>\r
+\r
+<!ELEMENT Games  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/MLBGamesPlayedXML.xml b/test/xml/sportinfo/MLBGamesPlayedXML.xml
new file mode 100644 (file)
index 0000000..2fb9831
--- /dev/null
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLBGamesPlayedXML.dtd">\r
+<message>\r
+<XML_File_ID>11191907</XML_File_ID>\r
+<heading>AAX%AL-GAMESPLAYED-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<title>2002 AL Games Played Leaders</title>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Name>Jim Thome, CLE</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Derek Jeter, NYY</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Torii Hunter, MIN</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Paul Konerko, SOX</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Alex Rodriguez, TEX</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Miguel Tejada, OAK</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Terrence Long, OAK</Name>\r
+<Games>77</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>8</Rank>\r
+<Name>Garret Anderson, ANA</Name>\r
+<Games>76</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jason Giambi, NYY</Name>\r
+<Games>76</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>10</Rank>\r
+<Name>Omar Vizquel, CLE</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tony Batista, BAL</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jacque Jones, MIN</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Frank Thomas, SOX</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ichiro Suzuki, SEA</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mike Cameron, SEA</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>John Olerud, SEA</Name>\r
+<Games>75</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>17</Rank>\r
+<Name>Matt Lawton, CLE</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Tim Salmon, ANA</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Delgado, TOR</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jose Cruz, TOR</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Bernie Williams, NYY</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Neifi Perez, KC</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Carlos Beltran, KC</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Magglio Ordonez, SOX</Name>\r
+<Games>74</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>25</Rank>\r
+<Name>Shea Hillenbrand, BOS</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Alfonso Soriano, NYY</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Mike Sweeney, KC</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Bret Boone, SEA</Name>\r
+<Games>73</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>29</Rank>\r
+<Name>Troy Glaus, ANA</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Raul Mondesi, TOR</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Vernon Wells, TOR</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Nick Johnson, NYY</Name>\r
+<Games>72</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank>33</Rank>\r
+<Name>Nomar Garciaparra, BOS</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Cristian Guzman, MIN</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Kenny Lofton, SOX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Ray Durham, SOX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Royce Clayton, SOX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Jeff Cirillo, SEA</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Michael Young, TEX</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<Listing>\r
+<Rank></Rank>\r
+<Name>Randy Winn, TB</Name>\r
+<Games>71</Games>\r
+</Listing>\r
+<time_stamp> June 27, 2002, at 11:51 AM ET </time_stamp>\r
+</message>\r