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

index 698789df29d71c75cdf91b658a0852256a40e009..232409e74d33bcd117e1ba3577f37e2669af6182 100644 (file)
@@ -242,6 +242,8 @@ MLB_Pitching_CG_Leaders.dtd
 MLB_Pitching_ER_Allowed_Leaders.dtd
 .IP \[bu]
 MLB_Pitching_Hits_Allowed_Leaders.dtd
+.IP \[bu]
+MLB_Pitching_Hit_Batters_Leaders.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/MLB_Pitching_Hit_Batters_Leaders.dtd b/schema/MLB_Pitching_Hit_Batters_Leaders.dtd
new file mode 100644 (file)
index 0000000..417c0dd
--- /dev/null
@@ -0,0 +1,24 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , Title , Top_Hit_Batters_Leaders , 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 Top_Hit_Batters_Leaders  (Listing+ )>\r
+\r
+<!ELEMENT Listing  (Rank , Player_Team , Hit_Batters )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Player_Team  (#PCDATA )>\r
+\r
+<!ELEMENT Hit_Batters  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/MLB_Pitching_Hit_Batters_Leaders/MLB_Pitching_Hit_Batters_Leaders.xml b/schemagen/MLB_Pitching_Hit_Batters_Leaders/MLB_Pitching_Hit_Batters_Leaders.xml
new file mode 100644 (file)
index 0000000..1566b65
--- /dev/null
@@ -0,0 +1,212 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLB_Pitching_Hit_Batters_Leaders.dtd">\r
+<message>\r
+<XML_File_ID>3020117</XML_File_ID>\r
+<heading>AAX%AL-HITBATTER-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<Title>2002 AL Hit Batters Leaders</Title>\r
+<Top_Hit_Batters_Leaders>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Player_Team>Ryan Rupe, TB</Player_Team>\r
+<Hit_Batters>10</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>2</Rank>\r
+<Player_Team>Jeff Weaver, DET</Player_Team>\r
+<Hit_Batters>7</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Pedro Martinez, BOS</Player_Team>\r
+<Hit_Batters>7</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Luke Prokopec, TOR</Player_Team>\r
+<Hit_Batters>7</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>5</Rank>\r
+<Player_Team>Darren Oliver, BOS</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Kyle Lohse, MIN</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Ismael Valdes, TEX</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Joe Kennedy, TB</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>9</Rank>\r
+<Player_Team>Roy Halladay, TOR</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Barry Zito, OAK</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Todd Ritchie, SOX</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Chan Ho Park, TEX</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Scott Erickson, BAL</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Ted Lilly, NYY</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Rolando Arrojo, BOS</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>James Baldwin, SEA</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>17</Rank>\r
+<Player_Team>Justin Miller, TOR</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Dave Burba, TEX</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Dan Reichert, KC</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Paul Wilson, TB</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Steve Sparks, DET</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Kevin Appier, ANA</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Tim Hudson, OAK</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Chad Bradford, OAK</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Gary Glover, SOX</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Mike Jackson, MIN</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Derek Lowe, BOS</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Scott Schoeneweis, ANA</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>29</Rank>\r
+<Player_Team>Mike Smith, TOR</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>John Burkett, BOS</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Travis Harper, TB</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Tim Wakefield, BOS</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Ramon Ortiz, ANA</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Jeremy Affeldt, KC</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Mike Mussina, NYY</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Cory Lidle, OAK</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Doug Davis, TEX</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Aaron Sele, ANA</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Danny Wright, SOX</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Jose Paniagua, DET</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+</Top_Hit_Batters_Leaders>\r
+<time_stamp> June 25, 2002, at 02:30 PM ET </time_stamp>\r
+</message>\r
index d80b695ee843bf76877ee621c1e63dc7734f3cc1..9cbb0f46269b267cd34dc232bb1bd09f15b1a2e6 100644 (file)
@@ -139,7 +139,7 @@ dtds =
     "MLB_Pitching_CG_Leaders.dtd",
     "MLB_Pitching_ER_Allowed_Leaders.dtd",
     "MLB_Pitching_Hits_Allowed_Leaders.dtd",
-    "MLB_Pitching_Hit_Batters_Leaders.dtd", -- no dtd
+    "MLB_Pitching_Hit_Batters_Leaders.dtd",
     "MLB_Pitching_HR_Allowed_Leaders.dtd", -- no dtd
     "MLB_Pitching_IP_Leaders.dtd", -- no dtd
     "MLB_Pitching_Runs_Allowed_Leaders.dtd", -- no dtd
@@ -382,7 +382,8 @@ sport_info_test_files =
     "MLB_Pitching_Balks_Leaders.xml",
     "MLB_Pitching_CG_Leaders.xml",
     "MLB_Pitching_ER_Allowed_Leaders.xml",
-    "MLB_Pitching_Hits_Allowed_Leaders.xml"
+    "MLB_Pitching_Hits_Allowed_Leaders.xml",
+    "MLB_Pitching_Hit_Batters_Leaders.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/MLB_Pitching_Hit_Batters_Leaders.dtd b/test/xml/sportinfo/MLB_Pitching_Hit_Batters_Leaders.dtd
new file mode 100644 (file)
index 0000000..417c0dd
--- /dev/null
@@ -0,0 +1,24 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , Title , Top_Hit_Batters_Leaders , 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 Top_Hit_Batters_Leaders  (Listing+ )>\r
+\r
+<!ELEMENT Listing  (Rank , Player_Team , Hit_Batters )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Player_Team  (#PCDATA )>\r
+\r
+<!ELEMENT Hit_Batters  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/MLB_Pitching_Hit_Batters_Leaders.xml b/test/xml/sportinfo/MLB_Pitching_Hit_Batters_Leaders.xml
new file mode 100644 (file)
index 0000000..1566b65
--- /dev/null
@@ -0,0 +1,212 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLB_Pitching_Hit_Batters_Leaders.dtd">\r
+<message>\r
+<XML_File_ID>3020117</XML_File_ID>\r
+<heading>AAX%AL-HITBATTER-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<Title>2002 AL Hit Batters Leaders</Title>\r
+<Top_Hit_Batters_Leaders>\r
+<Listing>\r
+<Rank>1</Rank>\r
+<Player_Team>Ryan Rupe, TB</Player_Team>\r
+<Hit_Batters>10</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>2</Rank>\r
+<Player_Team>Jeff Weaver, DET</Player_Team>\r
+<Hit_Batters>7</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Pedro Martinez, BOS</Player_Team>\r
+<Hit_Batters>7</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Luke Prokopec, TOR</Player_Team>\r
+<Hit_Batters>7</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>5</Rank>\r
+<Player_Team>Darren Oliver, BOS</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Kyle Lohse, MIN</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Ismael Valdes, TEX</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Joe Kennedy, TB</Player_Team>\r
+<Hit_Batters>6</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>9</Rank>\r
+<Player_Team>Roy Halladay, TOR</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Barry Zito, OAK</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Todd Ritchie, SOX</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Chan Ho Park, TEX</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Scott Erickson, BAL</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Ted Lilly, NYY</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Rolando Arrojo, BOS</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>James Baldwin, SEA</Player_Team>\r
+<Hit_Batters>5</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>17</Rank>\r
+<Player_Team>Justin Miller, TOR</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Dave Burba, TEX</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Dan Reichert, KC</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Paul Wilson, TB</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Steve Sparks, DET</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Kevin Appier, ANA</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Tim Hudson, OAK</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Chad Bradford, OAK</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Gary Glover, SOX</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Mike Jackson, MIN</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Derek Lowe, BOS</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Scott Schoeneweis, ANA</Player_Team>\r
+<Hit_Batters>4</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank>29</Rank>\r
+<Player_Team>Mike Smith, TOR</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>John Burkett, BOS</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Travis Harper, TB</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Tim Wakefield, BOS</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Ramon Ortiz, ANA</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Jeremy Affeldt, KC</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Mike Mussina, NYY</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Cory Lidle, OAK</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Doug Davis, TEX</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Aaron Sele, ANA</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Danny Wright, SOX</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+<Listing>\r
+<Rank />\r
+<Player_Team>Jose Paniagua, DET</Player_Team>\r
+<Hit_Batters>3</Hit_Batters>\r
+</Listing>\r
+</Top_Hit_Batters_Leaders>\r
+<time_stamp> June 25, 2002, at 02:30 PM ET </time_stamp>\r
+</message>\r