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

index c375b9d3767311d7daa1719db2950efabe04e408..94a9e531e712a698f6f76d2dbe0c49f7420ddd97 100644 (file)
@@ -308,6 +308,8 @@ NBATurnoversXML.dtd
 NCAA_Conference_Schedule_XML.dtd
 .IP \[bu]
 nflfirstdownxml.dtd
+.IP \[bu]
+NFLFumbleLeaderXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/NFLFumbleLeaderXML.dtd b/schema/NFLFumbleLeaderXML.dtd
new file mode 100644 (file)
index 0000000..eaf3eda
--- /dev/null
@@ -0,0 +1,24 @@
+<!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 , Fumbles , Own-Rec )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Player_Team  (#PCDATA )>\r
+\r
+<!ELEMENT Fumbles  (#PCDATA )>\r
+\r
+<!ELEMENT Own-Rec  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/NFLFumbleLeaderXML/NFLFumbleLeaderXML.xml b/schemagen/NFLFumbleLeaderXML/NFLFumbleLeaderXML.xml
new file mode 100644 (file)
index 0000000..292c14e
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLFumbleLeaderXML.dtd">\r
+<message>\r
+<XML_File_ID>892495</XML_File_ID>\r
+<heading>ABX%AFC-FUMBLES-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>NFL</sport>\r
+<title>2003 AFC Fumbles Leaders</title>\r
+<listing>\r
+<Rank>1</Rank>\r
+<Player_Team>Kyle Boller, BAL</Player_Team>\r
+<Fumbles>7</Fumbles>\r
+<Own-Rec>3</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>2</Rank>\r
+<Player_Team>Tom Brady, NE</Player_Team>\r
+<Fumbles>6</Fumbles>\r
+<Own-Rec>2</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Drew Bledsoe, BUF</Player_Team>\r
+<Fumbles>6</Fumbles>\r
+<Own-Rec>4</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Steve McNair, TEN</Player_Team>\r
+<Fumbles>6</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>5</Rank>\r
+<Player_Team>Ricky Williams, MIA</Player_Team>\r
+<Fumbles>5</Fumbles>\r
+<Own-Rec>0</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Byron Leftwich, JAC</Player_Team>\r
+<Fumbles>5</Fumbles>\r
+<Own-Rec>2</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>William Green, CLE</Player_Team>\r
+<Fumbles>5</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>8</Rank>\r
+<Player_Team>Trey Teague, BUF</Player_Team>\r
+<Fumbles>4</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Fred Taylor, JAC</Player_Team>\r
+<Fumbles>4</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Tommy Maddox, PIT</Player_Team>\r
+<Fumbles>4</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>11</Rank>\r
+<Player_Team>Clinton Portis, DEN</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Santana Moss, NYJ</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>2</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Jon Kitna, CIN</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Jamal Lewis, BAL</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Jeff Faine, CLE</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<time_stamp> October 29, 2003, at 03:13 PM ET </time_stamp>\r
+</message>\r
index 84f00cdbea7a60544c7184a71ef296766aa60d53..b1f42ced07c3f35e2873cd6f2d87b57d53a0fc36 100644 (file)
@@ -172,7 +172,7 @@ dtds =
     "NBATurnoversXML.dtd",
     "NCAA_Conference_Schedule_XML.dtd",
     "nflfirstdownxml.dtd",
-    "NFLFumbleLeaderXML.dtd", -- no dtd
+    "NFLFumbleLeaderXML.dtd",
     "NFLGiveTakeXML.dtd", -- no dtd
     "NFLGrassTurfDomeOutsideXML.dtd", -- no dtd
     "NFLInside20XML.dtd", -- no dtd
@@ -415,7 +415,8 @@ sport_info_test_files =
     "nbatripledoublexml.xml",
     "NBATurnoversXML.xml",
     "NCAA_Conference_Schedule_XML.xml",
-    "nflfirstdownxml.xml"
+    "nflfirstdownxml.xml",
+    "NFLFumbleLeaderXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/NFLFumbleLeaderXML.dtd b/test/xml/sportinfo/NFLFumbleLeaderXML.dtd
new file mode 100644 (file)
index 0000000..eaf3eda
--- /dev/null
@@ -0,0 +1,24 @@
+<!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 , Fumbles , Own-Rec )>\r
+\r
+<!ELEMENT Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Player_Team  (#PCDATA )>\r
+\r
+<!ELEMENT Fumbles  (#PCDATA )>\r
+\r
+<!ELEMENT Own-Rec  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/NFLFumbleLeaderXML.xml b/test/xml/sportinfo/NFLFumbleLeaderXML.xml
new file mode 100644 (file)
index 0000000..292c14e
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLFumbleLeaderXML.dtd">\r
+<message>\r
+<XML_File_ID>892495</XML_File_ID>\r
+<heading>ABX%AFC-FUMBLES-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>NFL</sport>\r
+<title>2003 AFC Fumbles Leaders</title>\r
+<listing>\r
+<Rank>1</Rank>\r
+<Player_Team>Kyle Boller, BAL</Player_Team>\r
+<Fumbles>7</Fumbles>\r
+<Own-Rec>3</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>2</Rank>\r
+<Player_Team>Tom Brady, NE</Player_Team>\r
+<Fumbles>6</Fumbles>\r
+<Own-Rec>2</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Drew Bledsoe, BUF</Player_Team>\r
+<Fumbles>6</Fumbles>\r
+<Own-Rec>4</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Steve McNair, TEN</Player_Team>\r
+<Fumbles>6</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>5</Rank>\r
+<Player_Team>Ricky Williams, MIA</Player_Team>\r
+<Fumbles>5</Fumbles>\r
+<Own-Rec>0</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Byron Leftwich, JAC</Player_Team>\r
+<Fumbles>5</Fumbles>\r
+<Own-Rec>2</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>William Green, CLE</Player_Team>\r
+<Fumbles>5</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>8</Rank>\r
+<Player_Team>Trey Teague, BUF</Player_Team>\r
+<Fumbles>4</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Fred Taylor, JAC</Player_Team>\r
+<Fumbles>4</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Tommy Maddox, PIT</Player_Team>\r
+<Fumbles>4</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank>11</Rank>\r
+<Player_Team>Clinton Portis, DEN</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Santana Moss, NYJ</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>2</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Jon Kitna, CIN</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Jamal Lewis, BAL</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<listing>\r
+<Rank></Rank>\r
+<Player_Team>Jeff Faine, CLE</Player_Team>\r
+<Fumbles>3</Fumbles>\r
+<Own-Rec>1</Own-Rec>\r
+</listing>\r
+<time_stamp> October 29, 2003, at 03:13 PM ET </time_stamp>\r
+</message>\r