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

index 5145f8ccdab9a42c7185ff9ea80804aa68f24db9..fbb7ce0079f7e76943a0e3bf2a3f2ea8f776961a 100644 (file)
@@ -300,6 +300,8 @@ nbastandxml.dtd
 NBAStealsXML.dtd
 .IP \[bu]
 nbateamleadersxml.dtd
+.IP \[bu]
+nbatripledoublexml.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/nbatripledoublexml.dtd b/schema/nbatripledoublexml.dtd
new file mode 100644 (file)
index 0000000..691f5e3
--- /dev/null
@@ -0,0 +1,28 @@
+<!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  (date , player , team , opponent , statscat , career )>\r
+\r
+<!ELEMENT date  (#PCDATA )>\r
+\r
+<!ELEMENT player  (#PCDATA )>\r
+\r
+<!ELEMENT team  (#PCDATA )>\r
+\r
+<!ELEMENT opponent  (#PCDATA )>\r
+\r
+<!ELEMENT statscat  (#PCDATA )>\r
+\r
+<!ELEMENT career  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/nbatripledoublexml/nbatripledoublexml.xml b/schemagen/nbatripledoublexml/nbatripledoublexml.xml
new file mode 100644 (file)
index 0000000..5a421c9
--- /dev/null
@@ -0,0 +1,130 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "nbatripledoublexml.dtd">\r
+<message>\r
+<XML_File_ID>203650917</XML_File_ID>\r
+<heading>ACX%TRIPLE-DOUBLE</heading>\r
+<category>Leaders</category>\r
+<sport>NBA</sport>\r
+<title>2000-2001 NBA Triple-Doubles</title>\r
+<listing>\r
+<date>10/31</date>\r
+<player>Gary Payton</player>\r
+<team>Seattle</team><opponent>Vancouver</opponent>\r
+<statscat>27 Pts, 14 Reb, 10 Ast</statscat><career>11</career>\r
+</listing>\r
+<listing>\r
+<date>10/31</date>\r
+<player>Jason Kidd</player>\r
+<team>Phoenix</team><opponent>Golden State</opponent>\r
+<statscat>24 Pts, 10 Reb, 11 Ast</statscat><career>32</career>\r
+</listing>\r
+<listing>\r
+<date>11/09</date>\r
+<player>Jason Kidd (2)</player>\r
+<team>Phoenix</team><opponent>Atlanta</opponent>\r
+<statscat>19 Pts, 13 Reb, 12 Ast</statscat><career>33</career>\r
+</listing>\r
+<listing>\r
+<date>11/11</date>\r
+<player>Charles Oakley</player>\r
+<team>Toronto</team><opponent>Chicago</opponent>\r
+<statscat>10 Pts, 11 Reb, 12 Ast</statscat><career>3</career>\r
+</listing>\r
+<listing>\r
+<date>11/17</date>\r
+<player>Jason Kidd (3)</player>\r
+<team>Phoenix</team><opponent>New York</opponent>\r
+<statscat>18 Pts, 12 Reb, 10 Ast</statscat><career>34</career>\r
+</listing>\r
+<listing>\r
+<date>11/22</date>\r
+<player>Baron Davis</player>\r
+<team>Charlotte</team><opponent>Philadelphia</opponent>\r
+<statscat>12 Pts, 10 Reb, 11 Ast</statscat><career>1</career>\r
+</listing>\r
+<listing>\r
+<date>11/25</date>\r
+<player>Baron Davis (2)</player>\r
+<team>Charlotte</team><opponent>Cleveland</opponent>\r
+<statscat>14 Pts, 10 Reb, 11 Ast</statscat><career>2</career>\r
+</listing>\r
+<listing>\r
+<date>11/26</date>\r
+<player>Mark Jackson</player>\r
+<team>Toronto</team><opponent>Chicago</opponent>\r
+<statscat>11 Pts, 11 Reb, 11 Ast</statscat><career>17</career>\r
+</listing>\r
+<listing>\r
+<date>11/29</date>\r
+<player>Lamar Odom</player>\r
+<team>LA Clippers</team><opponent>Golden State</opponent>\r
+<statscat>16 Pts, 12 Reb, 11 Ast</statscat><career>4</career>\r
+</listing>\r
+<listing>\r
+<date>12/02</date>\r
+<player>Michael Finley</player>\r
+<team>Dallas</team><opponent>Golden State</opponent>\r
+<statscat>13 Pts, 13 Reb, 10 Ast</statscat><career>6</career>\r
+</listing>\r
+<listing>\r
+<date>12/08</date>\r
+<player>Antoine Walker</player>\r
+<team>Boston</team><opponent>Indiana</opponent>\r
+<statscat>16 Pts, 10 Reb, 12 Ast</statscat><career>5</career>\r
+</listing>\r
+<listing>\r
+<date>12/15</date>\r
+<player>Kevin Garnett</player>\r
+<team>Minnesota</team><opponent>Detroit</opponent>\r
+<statscat>26 Pts, 13 Reb, 10 Ast</statscat><career>3</career>\r
+</listing>\r
+<listing>\r
+<date>12/16</date>\r
+<player>Antoine Walker (2)</player>\r
+<team>Boston</team><opponent>Charlotte</opponent>\r
+<statscat>20 Pts, 11 Reb, 10 Ast</statscat><career>6</career>\r
+</listing>\r
+<listing>\r
+<date>12/20</date>\r
+<player>Gary Payton (2)</player>\r
+<team>Seattle</team><opponent>Sacramento</opponent>\r
+<statscat>19 Pts, 12 Reb, 10 Ast</statscat><career>12</career>\r
+</listing>\r
+<listing>\r
+<date>12/23</date>\r
+<player>Jason Kidd (4)</player>\r
+<team>Phoenix</team><opponent>Denver</opponent>\r
+<statscat>14 Pts, 10 Reb, 13 Ast</statscat><career>35</career>\r
+</listing>\r
+<listing>\r
+<date>12/30</date>\r
+<player>Aaron McKie</player>\r
+<team>Philadel.</team><opponent>Sacramento</opponent>\r
+<statscat>19 Pts, 10 Reb, 14 Ast</statscat><career>1</career>\r
+</listing>\r
+<listing>\r
+<date>01/03</date>\r
+<player>Aaron McKie (2)</player>\r
+<team>Philadel.</team><opponent>Atlanta</opponent>\r
+<statscat>11 Pts, 10 Reb, 10 Ast</statscat><career>2</career>\r
+</listing>\r
+<listing>\r
+<date>01/05</date>\r
+<player>Jason Kidd (5)</player>\r
+<team>Phoenix</team><opponent>Vancouver</opponent>\r
+<statscat>11 Pts, 10 Reb, 14 Ast</statscat><career>36</career>\r
+</listing>\r
+<listing>\r
+<date>01/15</date>\r
+<player>Antoine Walker (3)</player>\r
+<team>Boston</team><opponent>Minnesota</opponent>\r
+<statscat>20 Pts, 12 Reb, 12 Ast</statscat><career>7</career>\r
+</listing>\r
+<listing>\r
+<date>01/15</date>\r
+<player>Kobe Bryant</player>\r
+<team>LA Lakers</team><opponent>Vancouver</opponent>\r
+<statscat>26 Pts, 11 Reb, 11 Ast</statscat><career>1</career>\r
+</listing>\r
+<time_stamp> January 16, 2001, at 02:56 PM ET </time_stamp>\r
+</message>\r
index a02d769ca6de6adbb73b566276ee8abfd48d9216..d703d3ae0481d4cf273c655bfdfee5deb4d1cdd1 100644 (file)
@@ -168,7 +168,7 @@ dtds =
     "nbastandxml.dtd",
     "NBAStealsXML.dtd",
     "nbateamleadersxml.dtd",
-    "nbatripledoublexml.dtd", -- no dtd
+    "nbatripledoublexml.dtd",
     "NBATurnoversXML.dtd", -- no dtd
     "NCAA_Conference_Schedule_XML.dtd", -- no dtd
     "nflfirstdownxml.dtd", -- no dtd
@@ -411,7 +411,8 @@ sport_info_test_files =
     "NBAScorersXML.xml",
     "nbastandxml.xml",
     "NBAStealsXML.xml",
-    "nbateamleadersxml.xml"
+    "nbateamleadersxml.xml",
+    "nbatripledoublexml.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/nbatripledoublexml.dtd b/test/xml/sportinfo/nbatripledoublexml.dtd
new file mode 100644 (file)
index 0000000..691f5e3
--- /dev/null
@@ -0,0 +1,28 @@
+<!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  (date , player , team , opponent , statscat , career )>\r
+\r
+<!ELEMENT date  (#PCDATA )>\r
+\r
+<!ELEMENT player  (#PCDATA )>\r
+\r
+<!ELEMENT team  (#PCDATA )>\r
+\r
+<!ELEMENT opponent  (#PCDATA )>\r
+\r
+<!ELEMENT statscat  (#PCDATA )>\r
+\r
+<!ELEMENT career  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/nbatripledoublexml.xml b/test/xml/sportinfo/nbatripledoublexml.xml
new file mode 100644 (file)
index 0000000..5a421c9
--- /dev/null
@@ -0,0 +1,130 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "nbatripledoublexml.dtd">\r
+<message>\r
+<XML_File_ID>203650917</XML_File_ID>\r
+<heading>ACX%TRIPLE-DOUBLE</heading>\r
+<category>Leaders</category>\r
+<sport>NBA</sport>\r
+<title>2000-2001 NBA Triple-Doubles</title>\r
+<listing>\r
+<date>10/31</date>\r
+<player>Gary Payton</player>\r
+<team>Seattle</team><opponent>Vancouver</opponent>\r
+<statscat>27 Pts, 14 Reb, 10 Ast</statscat><career>11</career>\r
+</listing>\r
+<listing>\r
+<date>10/31</date>\r
+<player>Jason Kidd</player>\r
+<team>Phoenix</team><opponent>Golden State</opponent>\r
+<statscat>24 Pts, 10 Reb, 11 Ast</statscat><career>32</career>\r
+</listing>\r
+<listing>\r
+<date>11/09</date>\r
+<player>Jason Kidd (2)</player>\r
+<team>Phoenix</team><opponent>Atlanta</opponent>\r
+<statscat>19 Pts, 13 Reb, 12 Ast</statscat><career>33</career>\r
+</listing>\r
+<listing>\r
+<date>11/11</date>\r
+<player>Charles Oakley</player>\r
+<team>Toronto</team><opponent>Chicago</opponent>\r
+<statscat>10 Pts, 11 Reb, 12 Ast</statscat><career>3</career>\r
+</listing>\r
+<listing>\r
+<date>11/17</date>\r
+<player>Jason Kidd (3)</player>\r
+<team>Phoenix</team><opponent>New York</opponent>\r
+<statscat>18 Pts, 12 Reb, 10 Ast</statscat><career>34</career>\r
+</listing>\r
+<listing>\r
+<date>11/22</date>\r
+<player>Baron Davis</player>\r
+<team>Charlotte</team><opponent>Philadelphia</opponent>\r
+<statscat>12 Pts, 10 Reb, 11 Ast</statscat><career>1</career>\r
+</listing>\r
+<listing>\r
+<date>11/25</date>\r
+<player>Baron Davis (2)</player>\r
+<team>Charlotte</team><opponent>Cleveland</opponent>\r
+<statscat>14 Pts, 10 Reb, 11 Ast</statscat><career>2</career>\r
+</listing>\r
+<listing>\r
+<date>11/26</date>\r
+<player>Mark Jackson</player>\r
+<team>Toronto</team><opponent>Chicago</opponent>\r
+<statscat>11 Pts, 11 Reb, 11 Ast</statscat><career>17</career>\r
+</listing>\r
+<listing>\r
+<date>11/29</date>\r
+<player>Lamar Odom</player>\r
+<team>LA Clippers</team><opponent>Golden State</opponent>\r
+<statscat>16 Pts, 12 Reb, 11 Ast</statscat><career>4</career>\r
+</listing>\r
+<listing>\r
+<date>12/02</date>\r
+<player>Michael Finley</player>\r
+<team>Dallas</team><opponent>Golden State</opponent>\r
+<statscat>13 Pts, 13 Reb, 10 Ast</statscat><career>6</career>\r
+</listing>\r
+<listing>\r
+<date>12/08</date>\r
+<player>Antoine Walker</player>\r
+<team>Boston</team><opponent>Indiana</opponent>\r
+<statscat>16 Pts, 10 Reb, 12 Ast</statscat><career>5</career>\r
+</listing>\r
+<listing>\r
+<date>12/15</date>\r
+<player>Kevin Garnett</player>\r
+<team>Minnesota</team><opponent>Detroit</opponent>\r
+<statscat>26 Pts, 13 Reb, 10 Ast</statscat><career>3</career>\r
+</listing>\r
+<listing>\r
+<date>12/16</date>\r
+<player>Antoine Walker (2)</player>\r
+<team>Boston</team><opponent>Charlotte</opponent>\r
+<statscat>20 Pts, 11 Reb, 10 Ast</statscat><career>6</career>\r
+</listing>\r
+<listing>\r
+<date>12/20</date>\r
+<player>Gary Payton (2)</player>\r
+<team>Seattle</team><opponent>Sacramento</opponent>\r
+<statscat>19 Pts, 12 Reb, 10 Ast</statscat><career>12</career>\r
+</listing>\r
+<listing>\r
+<date>12/23</date>\r
+<player>Jason Kidd (4)</player>\r
+<team>Phoenix</team><opponent>Denver</opponent>\r
+<statscat>14 Pts, 10 Reb, 13 Ast</statscat><career>35</career>\r
+</listing>\r
+<listing>\r
+<date>12/30</date>\r
+<player>Aaron McKie</player>\r
+<team>Philadel.</team><opponent>Sacramento</opponent>\r
+<statscat>19 Pts, 10 Reb, 14 Ast</statscat><career>1</career>\r
+</listing>\r
+<listing>\r
+<date>01/03</date>\r
+<player>Aaron McKie (2)</player>\r
+<team>Philadel.</team><opponent>Atlanta</opponent>\r
+<statscat>11 Pts, 10 Reb, 10 Ast</statscat><career>2</career>\r
+</listing>\r
+<listing>\r
+<date>01/05</date>\r
+<player>Jason Kidd (5)</player>\r
+<team>Phoenix</team><opponent>Vancouver</opponent>\r
+<statscat>11 Pts, 10 Reb, 14 Ast</statscat><career>36</career>\r
+</listing>\r
+<listing>\r
+<date>01/15</date>\r
+<player>Antoine Walker (3)</player>\r
+<team>Boston</team><opponent>Minnesota</opponent>\r
+<statscat>20 Pts, 12 Reb, 12 Ast</statscat><career>7</career>\r
+</listing>\r
+<listing>\r
+<date>01/15</date>\r
+<player>Kobe Bryant</player>\r
+<team>LA Lakers</team><opponent>Vancouver</opponent>\r
+<statscat>26 Pts, 11 Reb, 11 Ast</statscat><career>1</career>\r
+</listing>\r
+<time_stamp> January 16, 2001, at 02:56 PM ET </time_stamp>\r
+</message>\r