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

index d49beabc4fbe2a5fa029ceb89c4b86bc02829d3e..d3e762c66474143899ebc2c87335864fd3eff825 100644 (file)
@@ -342,6 +342,8 @@ NFL_Roster_XML.dtd
 NFL_Team_Stats_XML.dtd
 .IP \[bu]
 Transactions_XML.dtd
+.IP \[bu]
+Weekly_Sched_XML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/Weekly_Sched_XML.dtd b/schema/Weekly_Sched_XML.dtd
new file mode 100644 (file)
index 0000000..829ad28
--- /dev/null
@@ -0,0 +1,18 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , Title , Weekly_Schedule+ , 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 Weekly_Schedule  (Listing+ )>\r
+<!ATTLIST Weekly_Schedule  report CDATA  #REQUIRED >\r
+<!ELEMENT Listing  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/Weekly_Sched_XML/Weekly_Sched_XML.xml b/schemagen/Weekly_Sched_XML/Weekly_Sched_XML.xml
new file mode 100644 (file)
index 0000000..b981d37
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Weekly_Sched_XML.dtd">\r
+<message>\r
+<XML_File_ID>2210516</XML_File_ID>\r
+<heading>ACL!NBA-WEEKLY-SCHEDULE</heading>\r
+<category>Statistics</category>\r
+<sport>NBA</sport>\r
+<Title>2004 National Basketball Association Weekly Schedule</Title>\r
+<Weekly_Schedule report="Tuesday's Results">\r
+<Listing>\r
+New Jersey 96, Charlotte 89\r
+</Listing>\r
+<Listing>\r
+New Orleans 92, Philadelphia 89\r
+</Listing>\r
+<Listing>\r
+Indiana 93, Minnesota 92\r
+</Listing>\r
+<Listing>\r
+Chicago 95, Boston 92\r
+</Listing>\r
+<Listing>\r
+Milwaukee 107, Dallas 105\r
+</Listing>\r
+<Listing>\r
+Phoenix 104, San Antonio 96\r
+</Listing>\r
+<Listing>\r
+Utah 113, New York 89\r
+</Listing>\r
+<Listing>\r
+LA Clippers 96, Golden State 81\r
+</Listing>\r
+<Listing>\r
+LA Lakers 105, Sacramento 80\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Wednesday's Schedule">\r
+<Listing>\r
+Memphis at Atlanta, 11:00 a.m.\r
+</Listing>\r
+<Listing>\r
+Washington at Detroit, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Charlotte at Cleveland, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Utah at Phoenix, 10 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Thursday's Schedule">\r
+<Listing>\r
+Portland at Toronto, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Denver at LA Clippers, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Orlando at New Orleans, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Milwaukee at Memphis, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+New York at Dallas, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Chicago at Houston, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Philadelphia at San Antonio, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Golden State at LA Lakers, 10:30 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Friday's Schedule">\r
+<Listing>\r
+Portland at Charlotte, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+New Jersey at Boston, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Denver at Golden State, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Miami at Atlanta, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Washington at Detroit, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+New York at Minnesota, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Sacramento at Utah, 9 p.m.\r
+</Listing>\r
+<Listing>\r
+LA Clippers at LA Lakers, 10:30 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Saturday's Schedule">\r
+<Listing>\r
+Houston at Orlando, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Cleveland at Boston, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+New Jersey at Philadelphia, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Indiana at Minnesota, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Atlanta at Memphis, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Toronto at Chicago, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Seattle at San Antonio, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Dallas at Milwaukee, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+New Orleans at Sacramento, 10 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Sunday's Schedule">\r
+<Listing>\r
+Utah at Detroit, 6 p.m.\r
+</Listing>\r
+<Listing>\r
+Dallas at New York, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Charlotte at Washington, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Indiana at Denver, 9 p.m.\r
+</Listing>\r
+<Listing>\r
+New Orleans at LA Clippers, 9 p.m.\r
+</Listing>\r
+<Listing>\r
+Phoenix at LA Lakers, 10:30 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<time_stamp> October 20, 2004, at 01:04 PM ET </time_stamp>\r
+</message>\r
index eadbc984a4f498dc653615ca24e44e161f2d8e1e..6901dfab22560d8fdc71a169adf51e414300881e 100644 (file)
@@ -199,7 +199,7 @@ dtds =
     "NFL_Roster_XML.dtd",
     "NFL_Team_Stats_XML.dtd",
     "Transactions_XML.dtd",
-    "Weekly_Sched_XML.dtd", -- no dtd
+    "Weekly_Sched_XML.dtd",
     "WNBA_Team_Leaders_XML.dtd", -- no dtd
     "WNBA3PPctXML.dtd", -- no dtd
     "WNBAAssistsXML.dtd", -- no dtd
@@ -432,7 +432,8 @@ sport_info_test_files =
     "NFL_NBA_Draft_XML.xml",
     "NFL_Roster_XML.xml",
     "NFL_Team_Stats_XML.xml",
-    "Transactions_XML.xml"
+    "Transactions_XML.xml",
+    "Weekly_Sched_XML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/Weekly_Sched_XML.dtd b/test/xml/sportinfo/Weekly_Sched_XML.dtd
new file mode 100644 (file)
index 0000000..829ad28
--- /dev/null
@@ -0,0 +1,18 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , Title , Weekly_Schedule+ , 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 Weekly_Schedule  (Listing+ )>\r
+<!ATTLIST Weekly_Schedule  report CDATA  #REQUIRED >\r
+<!ELEMENT Listing  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/Weekly_Sched_XML.xml b/test/xml/sportinfo/Weekly_Sched_XML.xml
new file mode 100644 (file)
index 0000000..b981d37
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Weekly_Sched_XML.dtd">\r
+<message>\r
+<XML_File_ID>2210516</XML_File_ID>\r
+<heading>ACL!NBA-WEEKLY-SCHEDULE</heading>\r
+<category>Statistics</category>\r
+<sport>NBA</sport>\r
+<Title>2004 National Basketball Association Weekly Schedule</Title>\r
+<Weekly_Schedule report="Tuesday's Results">\r
+<Listing>\r
+New Jersey 96, Charlotte 89\r
+</Listing>\r
+<Listing>\r
+New Orleans 92, Philadelphia 89\r
+</Listing>\r
+<Listing>\r
+Indiana 93, Minnesota 92\r
+</Listing>\r
+<Listing>\r
+Chicago 95, Boston 92\r
+</Listing>\r
+<Listing>\r
+Milwaukee 107, Dallas 105\r
+</Listing>\r
+<Listing>\r
+Phoenix 104, San Antonio 96\r
+</Listing>\r
+<Listing>\r
+Utah 113, New York 89\r
+</Listing>\r
+<Listing>\r
+LA Clippers 96, Golden State 81\r
+</Listing>\r
+<Listing>\r
+LA Lakers 105, Sacramento 80\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Wednesday's Schedule">\r
+<Listing>\r
+Memphis at Atlanta, 11:00 a.m.\r
+</Listing>\r
+<Listing>\r
+Washington at Detroit, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Charlotte at Cleveland, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Utah at Phoenix, 10 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Thursday's Schedule">\r
+<Listing>\r
+Portland at Toronto, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Denver at LA Clippers, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Orlando at New Orleans, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Milwaukee at Memphis, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+New York at Dallas, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Chicago at Houston, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Philadelphia at San Antonio, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Golden State at LA Lakers, 10:30 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Friday's Schedule">\r
+<Listing>\r
+Portland at Charlotte, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+New Jersey at Boston, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Denver at Golden State, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Miami at Atlanta, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Washington at Detroit, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+New York at Minnesota, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Sacramento at Utah, 9 p.m.\r
+</Listing>\r
+<Listing>\r
+LA Clippers at LA Lakers, 10:30 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Saturday's Schedule">\r
+<Listing>\r
+Houston at Orlando, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Cleveland at Boston, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+New Jersey at Philadelphia, 7:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Indiana at Minnesota, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Atlanta at Memphis, 8 p.m.\r
+</Listing>\r
+<Listing>\r
+Toronto at Chicago, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Seattle at San Antonio, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+Dallas at Milwaukee, 8:30 p.m.\r
+</Listing>\r
+<Listing>\r
+New Orleans at Sacramento, 10 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<Weekly_Schedule report="Sunday's Schedule">\r
+<Listing>\r
+Utah at Detroit, 6 p.m.\r
+</Listing>\r
+<Listing>\r
+Dallas at New York, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Charlotte at Washington, 7 p.m.\r
+</Listing>\r
+<Listing>\r
+Indiana at Denver, 9 p.m.\r
+</Listing>\r
+<Listing>\r
+New Orleans at LA Clippers, 9 p.m.\r
+</Listing>\r
+<Listing>\r
+Phoenix at LA Lakers, 10:30 p.m.\r
+</Listing>\r
+</Weekly_Schedule>\r
+<time_stamp> October 20, 2004, at 01:04 PM ET </time_stamp>\r
+</message>\r