From c34a8f961718d5ee2de850d19255b803253e5832 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 17 Jun 2014 10:47:28 -0400 Subject: [PATCH] Add SportInfo support for MLBPlateAppsXML.dtd. --- doc/man1/htsn-import.1 | 2 + schema/MLBPlateAppsXML.dtd | 32 ++ schemagen/MLBPlateAppsXML/MLBPlateAppsXML.xml | 410 ++++++++++++++++++ src/TSN/XML/SportInfo.hs | 5 +- test/xml/sportinfo/MLBPlateAppsXML.dtd | 32 ++ test/xml/sportinfo/MLBPlateAppsXML.xml | 410 ++++++++++++++++++ 6 files changed, 889 insertions(+), 2 deletions(-) create mode 100644 schema/MLBPlateAppsXML.dtd create mode 100644 schemagen/MLBPlateAppsXML/MLBPlateAppsXML.xml create mode 100644 test/xml/sportinfo/MLBPlateAppsXML.dtd create mode 100644 test/xml/sportinfo/MLBPlateAppsXML.xml diff --git a/doc/man1/htsn-import.1 b/doc/man1/htsn-import.1 index 426d189..d0b2aa4 100644 --- a/doc/man1/htsn-import.1 +++ b/doc/man1/htsn-import.1 @@ -200,6 +200,8 @@ MLBKORateXML.dtd mlbonbasepctxml.dtd .IP \[bu] MLBOPSXML.dtd +.IP \[bu] +MLBPlateAppsXML.dtd .RE .P The GameInfo and SportInfo types do not have their own top-level diff --git a/schema/MLBPlateAppsXML.dtd b/schema/MLBPlateAppsXML.dtd new file mode 100644 index 0000000..1621b18 --- /dev/null +++ b/schema/MLBPlateAppsXML.dtd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/schemagen/MLBPlateAppsXML/MLBPlateAppsXML.xml b/schemagen/MLBPlateAppsXML/MLBPlateAppsXML.xml new file mode 100644 index 0000000..ffebee5 --- /dev/null +++ b/schemagen/MLBPlateAppsXML/MLBPlateAppsXML.xml @@ -0,0 +1,410 @@ + + + +81107117 +AAX%AL-PLATEAPPS-LEADERS +Statistics +MLB +2002 AL Plate Appearance Leaders ++1 +Derek Jeter, NYY +358 +319 +33 +4 +1 +1 + ++2 +Ichiro Suzuki, SEA +352 +307 +37 +2 +4 +2 + ++3 +Alex Rodriguez, TEX +345 +294 +44 +5 +2 +0 + ++4 +Alfonso Soriano, NYY +343 +326 +11 +4 +2 +0 + ++5 +Jason Giambi, NYY +339 +279 +52 +7 +1 +0 + ++6 +Bernie Williams, NYY +337 +288 +46 +2 +1 +0 + ++ +Jacque Jones, MIN +337 +308 +21 +2 +5 +1 + ++8 +Miguel Tejada, OAK +335 +316 +15 +4 +0 +0 + ++9 +Garret Anderson, ANA +328 +310 +13 +0 +5 +0 + ++ +Carlos Delgado, TOR +328 +264 +55 +6 +3 +0 + ++11 +Cristian Guzman, MIN +327 +311 +6 +2 +4 +4 + ++12 +Johnny Damon, BOS +326 +292 +27 +2 +4 +1 + ++13 +Torii Hunter, MIN +325 +300 +21 +1 +3 +0 + ++ +John Olerud, SEA +325 +267 +51 +1 +6 +0 + ++15 +Omar Vizquel, CLE +323 +275 +36 +4 +7 +1 + ++16 +Carlos Beltran, KC +322 +283 +33 +2 +3 +1 + ++17 +Randy Winn, TB +321 +295 +19 +4 +2 +1 + ++18 +Jim Thome, CLE +319 +251 +60 +5 +3 +0 + ++ +Troy Glaus, ANA +319 +274 +39 +3 +3 +0 + ++ +Raul Mondesi, TOR +319 +285 +30 +2 +2 +0 + ++ +Bret Boone, SEA +319 +285 +28 +2 +3 +1 + ++22 +Nomar Garciaparra, BOS +316 +288 +20 +2 +6 +0 + ++ +Shea Hillenbrand, BOS +316 +297 +11 +6 +2 +0 + ++ +Paul Konerko, SOX +316 +290 +21 +2 +3 +0 + ++25 +Neifi Perez, KC +315 +300 +8 +0 +4 +3 + ++26 +Matt Lawton, CLE +312 +266 +41 +4 +0 +1 + ++ +Jose Cruz, TOR +312 +276 +33 +0 +2 +1 + ++28 +Frank Thomas, SOX +311 +267 +37 +3 +4 +0 + ++29 +Tony Batista, BAL +310 +276 +24 +6 +4 +0 + ++30 +Magglio Ordonez, SOX +309 +281 +27 +0 +1 +0 + ++31 +Mike Sweeney, KC +308 +272 +30 +2 +4 +0 + ++ +Mike Cameron, SEA +308 +261 +39 +5 +2 +1 + ++33 +Darin Erstad, ANA +307 +289 +14 +1 +2 +1 + ++ +Terrence Long, OAK +307 +279 +27 +0 +1 +0 + ++35 +Melvin Mora, BAL +306 +261 +33 +9 +1 +2 + ++ +Ray Durham, SOX +306 +253 +37 +4 +4 +8 + ++37 +David Eckstein, ANA +305 +262 +25 +9 +3 +6 + ++38 +Steve Cox, TB +303 +278 +20 +4 +1 +0 + ++39 +Tim Salmon, ANA +302 +260 +36 +3 +3 +0 + ++ +Kenny Lofton, SOX +302 +261 +37 +0 +1 +3 + + June 27, 2002, at 11:51 AM ET + diff --git a/src/TSN/XML/SportInfo.hs b/src/TSN/XML/SportInfo.hs index 82d1833..9e87a3d 100644 --- a/src/TSN/XML/SportInfo.hs +++ b/src/TSN/XML/SportInfo.hs @@ -117,7 +117,7 @@ dtds = "MLBKORateXML.dtd", "mlbonbasepctxml.dtd", "MLBOPSXML.dtd", - "MLBPlateAppsXML.dtd", -- no dtd + "MLBPlateAppsXML.dtd", "mlbrbisxml.dtd", -- no dtd "mlbrunsleadersxml.dtd", -- no dtd "MLBSacFliesXML.dtd", -- no dtd @@ -361,7 +361,8 @@ sport_info_test_files = "MLBIntWalksXML.xml", "MLBKORateXML.xml", "mlbonbasepctxml.xml", - "MLBOPSXML.xml" + "MLBOPSXML.xml", + "MLBPlateAppsXML.xml" ] diff --git a/test/xml/sportinfo/MLBPlateAppsXML.dtd b/test/xml/sportinfo/MLBPlateAppsXML.dtd new file mode 100644 index 0000000..1621b18 --- /dev/null +++ b/test/xml/sportinfo/MLBPlateAppsXML.dtd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/xml/sportinfo/MLBPlateAppsXML.xml b/test/xml/sportinfo/MLBPlateAppsXML.xml new file mode 100644 index 0000000..ffebee5 --- /dev/null +++ b/test/xml/sportinfo/MLBPlateAppsXML.xml @@ -0,0 +1,410 @@ + + + +81107117 +AAX%AL-PLATEAPPS-LEADERS +Statistics +MLB +2002 AL Plate Appearance Leaders ++1 +Derek Jeter, NYY +358 +319 +33 +4 +1 +1 + ++2 +Ichiro Suzuki, SEA +352 +307 +37 +2 +4 +2 + ++3 +Alex Rodriguez, TEX +345 +294 +44 +5 +2 +0 + ++4 +Alfonso Soriano, NYY +343 +326 +11 +4 +2 +0 + ++5 +Jason Giambi, NYY +339 +279 +52 +7 +1 +0 + ++6 +Bernie Williams, NYY +337 +288 +46 +2 +1 +0 + ++ +Jacque Jones, MIN +337 +308 +21 +2 +5 +1 + ++8 +Miguel Tejada, OAK +335 +316 +15 +4 +0 +0 + ++9 +Garret Anderson, ANA +328 +310 +13 +0 +5 +0 + ++ +Carlos Delgado, TOR +328 +264 +55 +6 +3 +0 + ++11 +Cristian Guzman, MIN +327 +311 +6 +2 +4 +4 + ++12 +Johnny Damon, BOS +326 +292 +27 +2 +4 +1 + ++13 +Torii Hunter, MIN +325 +300 +21 +1 +3 +0 + ++ +John Olerud, SEA +325 +267 +51 +1 +6 +0 + ++15 +Omar Vizquel, CLE +323 +275 +36 +4 +7 +1 + ++16 +Carlos Beltran, KC +322 +283 +33 +2 +3 +1 + ++17 +Randy Winn, TB +321 +295 +19 +4 +2 +1 + ++18 +Jim Thome, CLE +319 +251 +60 +5 +3 +0 + ++ +Troy Glaus, ANA +319 +274 +39 +3 +3 +0 + ++ +Raul Mondesi, TOR +319 +285 +30 +2 +2 +0 + ++ +Bret Boone, SEA +319 +285 +28 +2 +3 +1 + ++22 +Nomar Garciaparra, BOS +316 +288 +20 +2 +6 +0 + ++ +Shea Hillenbrand, BOS +316 +297 +11 +6 +2 +0 + ++ +Paul Konerko, SOX +316 +290 +21 +2 +3 +0 + ++25 +Neifi Perez, KC +315 +300 +8 +0 +4 +3 + ++26 +Matt Lawton, CLE +312 +266 +41 +4 +0 +1 + ++ +Jose Cruz, TOR +312 +276 +33 +0 +2 +1 + ++28 +Frank Thomas, SOX +311 +267 +37 +3 +4 +0 + ++29 +Tony Batista, BAL +310 +276 +24 +6 +4 +0 + ++30 +Magglio Ordonez, SOX +309 +281 +27 +0 +1 +0 + ++31 +Mike Sweeney, KC +308 +272 +30 +2 +4 +0 + ++ +Mike Cameron, SEA +308 +261 +39 +5 +2 +1 + ++33 +Darin Erstad, ANA +307 +289 +14 +1 +2 +1 + ++ +Terrence Long, OAK +307 +279 +27 +0 +1 +0 + ++35 +Melvin Mora, BAL +306 +261 +33 +9 +1 +2 + ++ +Ray Durham, SOX +306 +253 +37 +4 +4 +8 + ++37 +David Eckstein, ANA +305 +262 +25 +9 +3 +6 + ++38 +Steve Cox, TB +303 +278 +20 +4 +1 +0 + ++39 +Tim Salmon, ANA +302 +260 +36 +3 +3 +0 + ++ +Kenny Lofton, SOX +302 +261 +37 +0 +1 +3 + + June 27, 2002, at 11:51 AM ET + -- 2.43.2