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

index b8920967655a77d816a4abca1a2b67ca8eca837e..4772d76f2d881a1b1ef9f161582d7b99dd6d98af 100644 (file)
@@ -168,6 +168,8 @@ Cbask_Tourn_MVP_XML.dtd
 Cbask_Tourn_Records_XML.dtd
 .IP \[bu]
 LeagueScheduleXML.dtd
+.IP \[bu]
+minorscoresxml.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/minorscoresxml.dtd b/schema/minorscoresxml.dtd
new file mode 100644 (file)
index 0000000..9af7d60
--- /dev/null
@@ -0,0 +1,24 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , game+ , 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 game  (vteam , vscore , hteam , hscore , status )>\r
+\r
+<!ELEMENT vteam  (#PCDATA )>\r
+\r
+<!ELEMENT vscore  (#PCDATA )>\r
+\r
+<!ELEMENT hteam  (#PCDATA )>\r
+\r
+<!ELEMENT hscore  (#PCDATA )>\r
+\r
+<!ELEMENT status  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/minorscoresxml/minorscoresxml.xml b/schemagen/minorscoresxml/minorscoresxml.xml
new file mode 100644 (file)
index 0000000..0a3aa60
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "minorscoresxml.dtd">\r
+<message>\r
+<XML_File_ID>17</XML_File_ID>\r
+<heading>BASK-W</heading>\r
+<category>Minor Scores</category>\r
+<sport>WBASK</sport>\r
+<game>\r
+<vteam>Cleveland</vteam><vscore>0</vscore>\r
+<hteam>Orlando</hteam><hscore>0</hscore>\r
+<status>7:00 pm (et)</status>\r
+</game>\r
+<game>\r
+<vteam>Los Angeles</vteam><vscore>0</vscore>\r
+<hteam>Phoenix</hteam><hscore>0</hscore>\r
+<status>9:00 pm (et)</status>\r
+</game>\r
+<time_stamp> December 5, 2000, at 12:23 PM ET </time_stamp>\r
+</message>\r
index ac908858117904671f431871a3382f4f169e7e15..3300b3adb1345d9defd24c6472f55a2225f78ca0 100644 (file)
@@ -101,7 +101,7 @@ dtds =
     "Cbask_Tourn_MVP_XML.dtd",
     "Cbask_Tourn_Records_XML.dtd",
     "LeagueScheduleXML.dtd",
-    "minorscoresxml.dtd", -- no dtd
+    "minorscoresxml.dtd",
     "Minor_Baseball_League_Leaders_XML.dtd", -- no dtd
     "Minor_Baseball_Standings_XML.dtd", -- no dtd
     "Minor_Baseball_Transactions_XML.dtd", -- no dtd
@@ -345,7 +345,8 @@ sport_info_test_files =
     "Cbask_Tourn_Leaders_XML.xml",
     "Cbask_Tourn_MVP_XML.xml",
     "Cbask_Tourn_Records_XML.xml",
-    "LeagueScheduleXML.xml"
+    "LeagueScheduleXML.xml",
+    "minorscoresxml.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/minorscoresxml.dtd b/test/xml/sportinfo/minorscoresxml.dtd
new file mode 100644 (file)
index 0000000..9af7d60
--- /dev/null
@@ -0,0 +1,24 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , game+ , 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 game  (vteam , vscore , hteam , hscore , status )>\r
+\r
+<!ELEMENT vteam  (#PCDATA )>\r
+\r
+<!ELEMENT vscore  (#PCDATA )>\r
+\r
+<!ELEMENT hteam  (#PCDATA )>\r
+\r
+<!ELEMENT hscore  (#PCDATA )>\r
+\r
+<!ELEMENT status  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/minorscoresxml.xml b/test/xml/sportinfo/minorscoresxml.xml
new file mode 100644 (file)
index 0000000..2f669e3
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "minorscoresxml.dtd">\r
+<message>\r
+<XML_File_ID>8193817</XML_File_ID>\r
+<heading>BASK-W</heading>\r
+<category>Minor Scores</category>\r
+<sport>WBASK</sport>\r
+<game>\r
+<vteam>Cleveland</vteam><vscore>0</vscore>\r
+<hteam>Orlando</hteam><hscore>0</hscore>\r
+<status>7:00 pm (et)</status>\r
+</game>\r
+<game>\r
+<vteam>Los Angeles</vteam><vscore>0</vscore>\r
+<hteam>Phoenix</hteam><hscore>0</hscore>\r
+<status>9:00 pm (et)</status>\r
+</game>\r
+<time_stamp> December 5, 2000, at 12:23 PM ET </time_stamp>\r
+</message>\r