From 4d7edbd0c4a10bfc8ba9072c1c28603a67342518 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 18 Jun 2014 11:12:47 -0400 Subject: [PATCH] Add SportInfo support for mlbstandxml_preseason.dtd. --- doc/man1/htsn-import.1 | 2 + schema/mlbstandxml_preseason.dtd | 26 +++++ .../mlbstandxml_preseason.xml | 94 +++++++++++++++++++ src/TSN/XML/SportInfo.hs | 5 +- test/xml/sportinfo/mlbstandxml_preseason.dtd | 26 +++++ test/xml/sportinfo/mlbstandxml_preseason.xml | 94 +++++++++++++++++++ 6 files changed, 245 insertions(+), 2 deletions(-) create mode 100644 schema/mlbstandxml_preseason.dtd create mode 100644 schemagen/mlbstandxml_preseason/mlbstandxml_preseason.xml create mode 100644 test/xml/sportinfo/mlbstandxml_preseason.dtd create mode 100644 test/xml/sportinfo/mlbstandxml_preseason.xml diff --git a/doc/man1/htsn-import.1 b/doc/man1/htsn-import.1 index dc1c1f0..15be458 100644 --- a/doc/man1/htsn-import.1 +++ b/doc/man1/htsn-import.1 @@ -216,6 +216,8 @@ MLBSBSuccessXML.dtd mlbsluggingpctxml.dtd .IP \[bu] mlbstandxml.dtd +.IP \[bu] +mlbstandxml_preseason.dtd .RE .P The GameInfo and SportInfo types do not have their own top-level diff --git a/schema/mlbstandxml_preseason.dtd b/schema/mlbstandxml_preseason.dtd new file mode 100644 index 0000000..c39594d --- /dev/null +++ b/schema/mlbstandxml_preseason.dtd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/schemagen/mlbstandxml_preseason/mlbstandxml_preseason.xml b/schemagen/mlbstandxml_preseason/mlbstandxml_preseason.xml new file mode 100644 index 0000000..f3275b2 --- /dev/null +++ b/schemagen/mlbstandxml_preseason/mlbstandxml_preseason.xml @@ -0,0 +1,94 @@ + + + +236536 +AAL!CACTUS-STAND +Standings +MLB +2004 MLB - Cactus League Standings ++Milwaukee +7 +1 +0 +.875 + ++Anaheim +5 +2 +0 +.714 + ++Arizona +4 +2 +0 +.667 + ++Kansas City +4 +3 +1 +.563 + ++Chicago Cubs +4 +3 +2 +.556 + ++Chicago White Sox +4 +4 +0 +.500 + ++Texas +4 +4 +0 +.500 + ++Seattle +3 +3 +0 +.500 + ++Colorado +3 +4 +0 +.429 + ++Oakland +3 +5 +0 +.375 + ++San Diego +1 +6 +0 +.143 + ++San Francisco +1 +6 +0 +.143 + + March 11, 2004, at 03:22 PM ET + diff --git a/src/TSN/XML/SportInfo.hs b/src/TSN/XML/SportInfo.hs index 06795a9..9e27c51 100644 --- a/src/TSN/XML/SportInfo.hs +++ b/src/TSN/XML/SportInfo.hs @@ -125,7 +125,7 @@ dtds = "MLBSBSuccessXML.dtd", "mlbsluggingpctxml.dtd", "mlbstandxml.dtd", - "mlbstandxml_preseason.dtd", -- no dtd + "mlbstandxml_preseason.dtd", "mlbstolenbasexml.dtd", -- no dtd "mlbtotalbasesleadersxml.dtd", -- no dtd "mlbtriplesleadersxml.dtd", -- no dtd @@ -369,7 +369,8 @@ sport_info_test_files = "MLBSacrificesXML.xml", "MLBSBSuccessXML.xml", "mlbsluggingpctxml.xml", - "mlbstandxml.xml" + "mlbstandxml.xml", + "mlbstandxml_preseason.xml" ] diff --git a/test/xml/sportinfo/mlbstandxml_preseason.dtd b/test/xml/sportinfo/mlbstandxml_preseason.dtd new file mode 100644 index 0000000..c39594d --- /dev/null +++ b/test/xml/sportinfo/mlbstandxml_preseason.dtd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/xml/sportinfo/mlbstandxml_preseason.xml b/test/xml/sportinfo/mlbstandxml_preseason.xml new file mode 100644 index 0000000..f3275b2 --- /dev/null +++ b/test/xml/sportinfo/mlbstandxml_preseason.xml @@ -0,0 +1,94 @@ + + + +236536 +AAL!CACTUS-STAND +Standings +MLB +2004 MLB - Cactus League Standings ++Milwaukee +7 +1 +0 +.875 + ++Anaheim +5 +2 +0 +.714 + ++Arizona +4 +2 +0 +.667 + ++Kansas City +4 +3 +1 +.563 + ++Chicago Cubs +4 +3 +2 +.556 + ++Chicago White Sox +4 +4 +0 +.500 + ++Texas +4 +4 +0 +.500 + ++Seattle +3 +3 +0 +.500 + ++Colorado +3 +4 +0 +.429 + ++Oakland +3 +5 +0 +.375 + ++San Diego +1 +6 +0 +.143 + ++San Francisco +1 +6 +0 +.143 + + March 11, 2004, at 03:22 PM ET + -- 2.43.2