From: Michael Orlitzky Date: Mon, 9 Jun 2014 18:26:38 +0000 (-0400) Subject: Add GameInfo support for CBASK_Lineup_XML.dtd. X-Git-Tag: 0.0.6~244 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=2642b213e183b3dd0620ff88787e2437a9ee8aee;p=dead%2Fhtsn-import.git Add GameInfo support for CBASK_Lineup_XML.dtd. --- diff --git a/doc/man1/htsn-import.1 b/doc/man1/htsn-import.1 index 869bb52..9f565a6 100644 --- a/doc/man1/htsn-import.1 +++ b/doc/man1/htsn-import.1 @@ -49,6 +49,8 @@ The XML document types obtained from the feed are uniquely identified by their DTDs. We currently support documents with the following DTDs: .IP \[bu] 2 Auto_Racing_Schedule_XML.dtd +.IP \[bu] 2 +CBASK_Lineup_XML.dtd (GameInfo) .IP \[bu] Heartbeat.dtd .IP \[bu] diff --git a/schema/CBASK_Lineup_XML.dtd b/schema/CBASK_Lineup_XML.dtd new file mode 100644 index 0000000..2498699 --- /dev/null +++ b/schema/CBASK_Lineup_XML.dtd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TSN/XML/GameInfo.hs b/src/TSN/XML/GameInfo.hs index f5b64e3..dcff90c 100644 --- a/src/TSN/XML/GameInfo.hs +++ b/src/TSN/XML/GameInfo.hs @@ -60,9 +60,14 @@ import Xml ( -- make sure that we are really receiving XML for these DTDs -- (i.e. the names are correct). -- +-- Those marked \"TSN DTD\" are the ones for which we did not +-- receive any XML during implementation; therefore the TSN DTD was +-- used. This matters because it is almost certainly incorrect, so +-- we can expect import failures when we finally do see some XML. +-- dtds :: [String] dtds = - [ "CBASK_Lineup_XML.dtd", -- missing DTD + [ "CBASK_Lineup_XML.dtd", -- TSN DTD "cbaskpreviewxml.dtd", -- missing DTD "cflpreviewxml.dtd", -- missing DTD "Matchup_NBA_NHL_XML.dtd", -- missing DTD @@ -186,7 +191,8 @@ gameinfo_tests = -- gameinfo_test_files :: [FilePath] gameinfo_test_files = - [ "test/xml/gameinfo/MLB_Gaming_Matchup_XML.xml", + [ "test/xml/gameinfo/CBASK_Lineup_XML.xml", + "test/xml/gameinfo/MLB_Gaming_Matchup_XML.xml", "test/xml/gameinfo/MLB_Lineup_XML.xml", "test/xml/gameinfo/MLB_Matchup_XML.xml", "test/xml/gameinfo/mlbpreviewxml.xml", diff --git a/test/xml/gameinfo/CBASK_Lineup_XML.dtd b/test/xml/gameinfo/CBASK_Lineup_XML.dtd new file mode 100644 index 0000000..2498699 --- /dev/null +++ b/test/xml/gameinfo/CBASK_Lineup_XML.dtd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/xml/gameinfo/CBASK_Lineup_XML.xml b/test/xml/gameinfo/CBASK_Lineup_XML.xml new file mode 100644 index 0000000..5883d3d --- /dev/null +++ b/test/xml/gameinfo/CBASK_Lineup_XML.xml @@ -0,0 +1,42 @@ + + + +17 +AEB;LINEUP-CANISIUS-RIDER +97865 +10199 +Lineups +CBASK +Probable Starting Lineup: Canisius at Rider + +Hodari Mallory + + +Edwin Muniz + + +Richard Jones + + +Robert Reed + + +Yaku Moton-Spruill + + +Jerry Johnson + + +Brian Dux + + +Robert Taylor + + +Kevin Downey + + +Laurence Young + + January 24, 2003, at 11:55 AM ET +