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

index 5bfaf27674969da1a75fd80d6089a4a3dd58a059..220a7e042e3562c95a416b1be15293db7dd842ed 100644 (file)
@@ -328,6 +328,8 @@ NFLSackLeadersXML.dtd
 nflstandxml.dtd
 .IP \[bu]
 NFLTeamRankingsXML.dtd
+.IP \[bu]
+NFLTopPerformanceXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/NFLTopPerformanceXML.dtd b/schema/NFLTopPerformanceXML.dtd
new file mode 100644 (file)
index 0000000..2f48102
--- /dev/null
@@ -0,0 +1,18 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , listing+ , 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 listing  (player+ )>\r
+<!ATTLIST listing  category CDATA  #REQUIRED >\r
+<!ELEMENT player  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/NFLTopPerformanceXML/NFLTopPerformanceXML.xml b/schemagen/NFLTopPerformanceXML/NFLTopPerformanceXML.xml
new file mode 100644 (file)
index 0000000..043f7fb
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLTopPerformanceXML.dtd">\r
+<message>\r
+<XML_File_ID>178111</XML_File_ID>\r
+<heading>ABX%AFC-BEST</heading>\r
+<category>Stats</category>\r
+<sport>NFL</sport>\r
+<title>Final 2001 AFC Statistics - Top Single Game Performances</title>\r
+<listing category="Most Points">\r
+<player>18, (9 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Passing Yards">\r
+<player>421, Manning, Ind. vs. Buff., 9/23</player>\r
+</listing>\r
+<listing category="Longest Pass">\r
+<player>91, Brady, N.E. at Ind., 10/21</player>\r
+</listing>\r
+<listing category="Passing Touchdowns">\r
+<player>4, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Rushing Yards">\r
+<player>266, Alexander, Sea. vs. Oak., 11/11</player>\r
+</listing>\r
+<listing category="Rushing Attempts">\r
+<player>36, Tomlinson, S.D. vs. Wash., 9/9</player>\r
+</listing>\r
+<listing category="Longest Rush">\r
+<player>96, Dillon, Cin. at Det., 10/28</player>\r
+</listing>\r
+<listing category="Receptions">\r
+<player>14, R. Smith, Denv. at Ariz., 9/23</player>\r
+</listing>\r
+<listing category="Receiving Yards">\r
+<player>196, Moulds, Buff. vs. Miami, 11/25</player>\r
+</listing>\r
+<listing category="Kickoff Return Yards">\r
+<player>250, Jenkins, S.D. at Oak., 11/18</player>\r
+</listing>\r
+<listing category="Kickoff Returns">\r
+<player>8, Wilkins, Ind. at Balt., 12/2</player>\r
+</listing>\r
+<listing category="Longest Kickoff Return">\r
+<player>101, Mason, Tenn. at Cin., 11/18</player>\r
+</listing>\r
+<listing category="Punt Return Yards">\r
+<player>126, Houshmandzadeh, Cin. at Clev., 11/25</player>\r
+</listing>\r
+<listing category="Punt Returns">\r
+<player>6, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Longest Punt Return">\r
+<player>88, Brown, Oak. vs. K.C., 12/9</player>\r
+</listing>\r
+<listing category="Interceptions">\r
+<player>4, O'Neal, Denv. vs. K.C., 10/7</player>\r
+</listing>\r
+<listing category="Longest Interception Return">\r
+<player>100, Marion, Miami vs. Buff., 1/6</player>\r
+</listing>\r
+<listing category="Sacks">\r
+<player>4.0, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Scrimmage Yards">\r
+<player>277, Holmes, K.C. at Oak., 12/9</player>\r
+</listing>\r
+<listing category="Longest Punt">\r
+<player>77, Turk, Miami at Buff., 11/25</player>\r
+</listing>\r
+<listing category="Punts">\r
+<player>10, Feagles, Sea. vs. Phil., 9/23</player>\r
+<player>10, Hentrich, Tenn. at Balt., 10/7</player>\r
+</listing>\r
+<listing category="Field Goals Made">\r
+<player>5, K. Brown, Pitt. at Clev., 11/11 (OT)</player>\r
+</listing>\r
+<listing category="Field Goals Made">\r
+<player>5, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Longest Field Goal">\r
+<player>55, K. Brown, Pitt. at K.C., 10/14</player>\r
+</listing>\r
+<time_stamp> January 10, 2002, at 04:23 PM ET </time_stamp>\r
+</message>\r
index 7f6b8c418385a89fa0c182741210b504ea5cd7d8..37764d4609cac2c4773a32d09d41b298f6e5a2f9 100644 (file)
@@ -188,8 +188,8 @@ dtds =
     "nflstandxml.dtd",
     "NFLTackleFFLeadersXML.dtd", -- no xml
     "NFLTeamRankingsXML.dtd",
-    "NFLTopKickoffReturnXML.dtd", -- no dtd
-    "NFLTopPerformanceXML.dtd", -- no dtd
+    "NFLTopKickoffReturnXML.dtd", -- no xml
+    "NFLTopPerformanceXML.dtd",
     "NFLTopPuntReturnXML.dtd", -- no dtd
     "NFLTotalYardageXML.dtd", -- no dtd
     "NFLYardsXML.dtd", -- no dtd
@@ -425,7 +425,8 @@ sport_info_test_files =
     "NFLQBStartsXML.xml",
     "NFLSackLeadersXML.xml",
     "nflstandxml.xml",
-    "NFLTeamRankingsXML.xml"
+    "NFLTeamRankingsXML.xml",
+    "NFLTopPerformanceXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/NFLTopPerformanceXML.dtd b/test/xml/sportinfo/NFLTopPerformanceXML.dtd
new file mode 100644 (file)
index 0000000..2f48102
--- /dev/null
@@ -0,0 +1,18 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , listing+ , 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 listing  (player+ )>\r
+<!ATTLIST listing  category CDATA  #REQUIRED >\r
+<!ELEMENT player  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/NFLTopPerformanceXML.xml b/test/xml/sportinfo/NFLTopPerformanceXML.xml
new file mode 100644 (file)
index 0000000..043f7fb
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLTopPerformanceXML.dtd">\r
+<message>\r
+<XML_File_ID>178111</XML_File_ID>\r
+<heading>ABX%AFC-BEST</heading>\r
+<category>Stats</category>\r
+<sport>NFL</sport>\r
+<title>Final 2001 AFC Statistics - Top Single Game Performances</title>\r
+<listing category="Most Points">\r
+<player>18, (9 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Passing Yards">\r
+<player>421, Manning, Ind. vs. Buff., 9/23</player>\r
+</listing>\r
+<listing category="Longest Pass">\r
+<player>91, Brady, N.E. at Ind., 10/21</player>\r
+</listing>\r
+<listing category="Passing Touchdowns">\r
+<player>4, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Rushing Yards">\r
+<player>266, Alexander, Sea. vs. Oak., 11/11</player>\r
+</listing>\r
+<listing category="Rushing Attempts">\r
+<player>36, Tomlinson, S.D. vs. Wash., 9/9</player>\r
+</listing>\r
+<listing category="Longest Rush">\r
+<player>96, Dillon, Cin. at Det., 10/28</player>\r
+</listing>\r
+<listing category="Receptions">\r
+<player>14, R. Smith, Denv. at Ariz., 9/23</player>\r
+</listing>\r
+<listing category="Receiving Yards">\r
+<player>196, Moulds, Buff. vs. Miami, 11/25</player>\r
+</listing>\r
+<listing category="Kickoff Return Yards">\r
+<player>250, Jenkins, S.D. at Oak., 11/18</player>\r
+</listing>\r
+<listing category="Kickoff Returns">\r
+<player>8, Wilkins, Ind. at Balt., 12/2</player>\r
+</listing>\r
+<listing category="Longest Kickoff Return">\r
+<player>101, Mason, Tenn. at Cin., 11/18</player>\r
+</listing>\r
+<listing category="Punt Return Yards">\r
+<player>126, Houshmandzadeh, Cin. at Clev., 11/25</player>\r
+</listing>\r
+<listing category="Punt Returns">\r
+<player>6, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Longest Punt Return">\r
+<player>88, Brown, Oak. vs. K.C., 12/9</player>\r
+</listing>\r
+<listing category="Interceptions">\r
+<player>4, O'Neal, Denv. vs. K.C., 10/7</player>\r
+</listing>\r
+<listing category="Longest Interception Return">\r
+<player>100, Marion, Miami vs. Buff., 1/6</player>\r
+</listing>\r
+<listing category="Sacks">\r
+<player>4.0, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Scrimmage Yards">\r
+<player>277, Holmes, K.C. at Oak., 12/9</player>\r
+</listing>\r
+<listing category="Longest Punt">\r
+<player>77, Turk, Miami at Buff., 11/25</player>\r
+</listing>\r
+<listing category="Punts">\r
+<player>10, Feagles, Sea. vs. Phil., 9/23</player>\r
+<player>10, Hentrich, Tenn. at Balt., 10/7</player>\r
+</listing>\r
+<listing category="Field Goals Made">\r
+<player>5, K. Brown, Pitt. at Clev., 11/11 (OT)</player>\r
+</listing>\r
+<listing category="Field Goals Made">\r
+<player>5, (3 times in Non-Overtime Games)</player>\r
+</listing>\r
+<listing category="Longest Field Goal">\r
+<player>55, K. Brown, Pitt. at K.C., 10/14</player>\r
+</listing>\r
+<time_stamp> January 10, 2002, at 04:23 PM ET </time_stamp>\r
+</message>\r