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

index 76927ecaf5f2903b431a435b3cf523a1a8d2b036..03f9543973b3c54bc44a2cca431cf4c73df51b51 100644 (file)
@@ -322,6 +322,8 @@ NFLMondayNightXML.dtd
 NFLPassLeadXML.dtd
 .IP \[bu]
 NFLQBStartsXML.dtd
+.IP \[bu]
+NFLSackLeadersXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/NFLSackLeadersXML.dtd b/schema/NFLSackLeadersXML.dtd
new file mode 100644 (file)
index 0000000..7f6a5e9
--- /dev/null
@@ -0,0 +1,22 @@
+<!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  (rank , Player_Team , Sacks )>\r
+\r
+<!ELEMENT rank  (#PCDATA )>\r
+\r
+<!ELEMENT Player_Team  (#PCDATA )>\r
+\r
+<!ELEMENT Sacks  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/NFLSackLeadersXML/NFLSackLeadersXML.xml b/schemagen/NFLSackLeadersXML/NFLSackLeadersXML.xml
new file mode 100644 (file)
index 0000000..2a7c46b
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLSackLeadersXML.dtd">\r
+<message>\r
+<XML_File_ID>892494</XML_File_ID>\r
+<heading>ABX%AFC-SACKS</heading>\r
+<category>Statistics</category>\r
+<sport>NFL</sport>\r
+<title>2003 AFC Top Sack Leaders</title>\r
+<listing>\r
+<rank>1</rank>\r
+<Player_Team>Shaun Ellis, NYJ</Player_Team>\r
+<Sacks>9</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>2</rank>\r
+<Player_Team>Adewale Ogunleye, MIA</Player_Team>\r
+<Sacks>7</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>3</rank>\r
+<Player_Team>Bertrand Berry, DEN</Player_Team>\r
+<Sacks>6.5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Jevon Kearse, TEN</Player_Team>\r
+<Sacks>6.5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>John Abraham, NYJ</Player_Team>\r
+<Sacks>6</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Courtney Brown, CLE</Player_Team>\r
+<Sacks>6</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>7</rank>\r
+<Player_Team>Trevor Pryce, DEN</Player_Team>\r
+<Sacks>5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Reggie Hayward, DEN</Player_Team>\r
+<Sacks>5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>9</rank>\r
+<Player_Team>Dequincy Scott, SD</Player_Team>\r
+<Sacks>4.5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Aaron Schobel, BUF</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Mike Vrabel, NE</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Dwight Freeney, IND</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Duane Clemons, CIN</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Vonnie Holliday, KC</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Scott Fujita, KC</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<time_stamp> October 29, 2003, at 03:13 PM ET </time_stamp>\r
+</message>\r
index 5e53ba61293aa4d41c583857b08a0da6e3e693ed..c1da0e97643e7e8c12829f401cc3e87a68247e7e 100644 (file)
@@ -182,9 +182,9 @@ dtds =
     "NFLPassingLeadersXML.dtd", -- no xml
     "NFLPassLeadXML.dtd",
     "NFLQBStartsXML.dtd",
-    "NFLReceivingLeadersXML.dtd", -- no dtd
-    "NFLRushingLeadersXML.dtd", -- no dtd
-    "NFLSackLeadersXML.dtd", -- no dtd
+    "NFLReceivingLeadersXML.dtd", -- no xml
+    "NFLRushingLeadersXML.dtd", -- no xml
+    "NFLSackLeadersXML.dtd",
     "nflstandxml.dtd", -- no dtd
     "NFLTackleFFLeadersXML.dtd", -- no dtd
     "NFLTeamRankingsXML.dtd", -- no dtd
@@ -422,7 +422,8 @@ sport_info_test_files =
     "NFLKickoffsXML.xml",
     "NFLMondayNightXML.xml",
     "NFLPassLeadXML.xml",
-    "NFLQBStartsXML.xml"
+    "NFLQBStartsXML.xml",
+    "NFLSackLeadersXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/NFLSackLeadersXML.dtd b/test/xml/sportinfo/NFLSackLeadersXML.dtd
new file mode 100644 (file)
index 0000000..7f6a5e9
--- /dev/null
@@ -0,0 +1,22 @@
+<!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  (rank , Player_Team , Sacks )>\r
+\r
+<!ELEMENT rank  (#PCDATA )>\r
+\r
+<!ELEMENT Player_Team  (#PCDATA )>\r
+\r
+<!ELEMENT Sacks  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/NFLSackLeadersXML.xml b/test/xml/sportinfo/NFLSackLeadersXML.xml
new file mode 100644 (file)
index 0000000..2a7c46b
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLSackLeadersXML.dtd">\r
+<message>\r
+<XML_File_ID>892494</XML_File_ID>\r
+<heading>ABX%AFC-SACKS</heading>\r
+<category>Statistics</category>\r
+<sport>NFL</sport>\r
+<title>2003 AFC Top Sack Leaders</title>\r
+<listing>\r
+<rank>1</rank>\r
+<Player_Team>Shaun Ellis, NYJ</Player_Team>\r
+<Sacks>9</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>2</rank>\r
+<Player_Team>Adewale Ogunleye, MIA</Player_Team>\r
+<Sacks>7</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>3</rank>\r
+<Player_Team>Bertrand Berry, DEN</Player_Team>\r
+<Sacks>6.5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Jevon Kearse, TEN</Player_Team>\r
+<Sacks>6.5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>John Abraham, NYJ</Player_Team>\r
+<Sacks>6</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Courtney Brown, CLE</Player_Team>\r
+<Sacks>6</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>7</rank>\r
+<Player_Team>Trevor Pryce, DEN</Player_Team>\r
+<Sacks>5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Reggie Hayward, DEN</Player_Team>\r
+<Sacks>5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank>9</rank>\r
+<Player_Team>Dequincy Scott, SD</Player_Team>\r
+<Sacks>4.5</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Aaron Schobel, BUF</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Mike Vrabel, NE</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Dwight Freeney, IND</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Duane Clemons, CIN</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Vonnie Holliday, KC</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<listing>\r
+<rank></rank>\r
+<Player_Team>Scott Fujita, KC</Player_Team>\r
+<Sacks>4</Sacks>\r
+</listing>\r
+<time_stamp> October 29, 2003, at 03:13 PM ET </time_stamp>\r
+</message>\r