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

index d3e762c66474143899ebc2c87335864fd3eff825..3c3978d99297adb785bff8fda254608469699d27 100644 (file)
@@ -344,6 +344,8 @@ NFL_Team_Stats_XML.dtd
 Transactions_XML.dtd
 .IP \[bu]
 Weekly_Sched_XML.dtd
+.IP \[bu]
+WNBA_Team_Leaders_XML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/WNBA_Team_Leaders_XML.dtd b/schema/WNBA_Team_Leaders_XML.dtd
new file mode 100644 (file)
index 0000000..bdc1211
--- /dev/null
@@ -0,0 +1,52 @@
+<!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  (team ,  (ownpoints | oppoints | ownfield | oppfield | ownfgpct | oppfgpct | ownturnover | oppturnover | marginturnover | offrebound | defrebound | totrebound | ownwinloss | oppwinloss | otwinloss | threeptswinloss | tenptswinloss )* )>\r
+\r
+<!ELEMENT team  (#PCDATA )>\r
+\r
+<!ELEMENT ownpoints  (#PCDATA )>\r
+\r
+<!ELEMENT oppoints  (#PCDATA )>\r
+\r
+<!ELEMENT ownfield  (#PCDATA )>\r
+\r
+<!ELEMENT oppfield  (#PCDATA )>\r
+\r
+<!ELEMENT ownfgpct  (#PCDATA )>\r
+\r
+<!ELEMENT oppfgpct  (#PCDATA )>\r
+\r
+<!ELEMENT ownturnover  (#PCDATA )>\r
+\r
+<!ELEMENT oppturnover  (#PCDATA )>\r
+\r
+<!ELEMENT marginturnover  (#PCDATA )>\r
+\r
+<!ELEMENT offrebound  (#PCDATA )>\r
+\r
+<!ELEMENT defrebound  (#PCDATA )>\r
+\r
+<!ELEMENT totrebound  (#PCDATA )>\r
+\r
+<!ELEMENT ownwinloss  (#PCDATA )>\r
+\r
+<!ELEMENT oppwinloss  (#PCDATA )>\r
+\r
+<!ELEMENT otwinloss  (#PCDATA )>\r
+\r
+<!ELEMENT threeptswinloss  (#PCDATA )>\r
+\r
+<!ELEMENT tenptswinloss  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/WNBA_Team_Leaders_XML/WNBA_Team_Leaders_XML.xml b/schemagen/WNBA_Team_Leaders_XML/WNBA_Team_Leaders_XML.xml
new file mode 100644 (file)
index 0000000..6456009
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Leaders 1.0/EN" "WNBA_Team_Leaders_XML.dtd">\r
+<message>\r
+<XML_File_ID>222572</XML_File_ID>\r
+<heading>BUX%TEAM-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>BASK-W</sport>\r
+<title>2003 WNBA Team Leaders</title>\r
+<listing>\r
+<team>Charlotte</team>\r
+<ownpoints>70.0</ownpoints><oppoints>74.0</oppoints>\r
+<ownfield>.369</ownfield><oppfield>.377</oppfield>\r
+<ownfgpct>.385</ownfgpct><oppfgpct>.333</oppfgpct>\r
+<ownturnover>14.0</ownturnover><oppturnover>11.0</oppturnover>\r
+<marginturnover>-3.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Cleveland</team>\r
+<ownpoints>71.0</ownpoints><oppoints>79.0</oppoints>\r
+<ownfield>.362</ownfield><oppfield>.405</oppfield>\r
+<ownfgpct>.316</ownfgpct><oppfgpct>.385</oppfgpct>\r
+<ownturnover>13.0</ownturnover><oppturnover>9.0</oppturnover>\r
+<marginturnover>-4.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Connecticut</team>\r
+<ownpoints>73.0</ownpoints><oppoints>82.0</oppoints>\r
+<ownfield>.345</ownfield><oppfield>.389</oppfield>\r
+<ownfgpct>.381</ownfgpct><oppfgpct>.125</oppfgpct>\r
+<ownturnover>15.0</ownturnover><oppturnover>14.0</oppturnover>\r
+<marginturnover>-1.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Houston</team>\r
+<ownpoints>72.0</ownpoints><oppoints>63.0</oppoints>\r
+<ownfield>.500</ownfield><oppfield>.398</oppfield>\r
+<ownfgpct>.235</ownfgpct><oppfgpct>.379</oppfgpct>\r
+<ownturnover>14.0</ownturnover><oppturnover>10.5</oppturnover>\r
+<marginturnover>-3.5</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Los Angeles</team>\r
+<ownpoints>*80.5</ownpoints><oppoints>72.0</oppoints>\r
+<ownfield>.397</ownfield><oppfield>.353</oppfield>\r
+<ownfgpct>.241</ownfgpct><oppfgpct>.350</oppfgpct>\r
+<ownturnover>11.5</ownturnover><oppturnover>14.0</oppturnover>\r
+<marginturnover>+2.5</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Minnesota</team>\r
+<ownpoints>72.0</ownpoints><oppoints>71.0</oppoints>\r
+<ownfield>*.510</ownfield><oppfield>.451</oppfield>\r
+<ownfgpct>.462</ownfgpct><oppfgpct>.357</oppfgpct>\r
+<ownturnover>21.0</ownturnover><oppturnover>12.0</oppturnover>\r
+<marginturnover>-9.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Phoenix</team>\r
+<ownpoints>59.0</ownpoints><oppoints>67.0</oppoints>\r
+<ownfield>.336</ownfield><oppfield>.449</oppfield>\r
+<ownfgpct>.263</ownfgpct><oppfgpct>.389</oppfgpct>\r
+<ownturnover>11.5</ownturnover><oppturnover>*17.5</oppturnover>\r
+<marginturnover>*+6.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Sacramento</team>\r
+<ownpoints>68.0</ownpoints><oppoints>64.0</oppoints>\r
+<ownfield>.427</ownfield><oppfield>.400</oppfield>\r
+<ownfgpct>.375</ownfgpct><oppfgpct>.318</oppfgpct>\r
+<ownturnover>15.5</ownturnover><oppturnover>*17.5</oppturnover>\r
+<marginturnover>+2.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>San Antonio</team>\r
+<ownpoints>65.0</ownpoints><oppoints>*56.0</oppoints>\r
+<ownfield>.467</ownfield><oppfield>*.313</oppfield>\r
+<ownfgpct>*.500</ownfgpct><oppfgpct>*.083</oppfgpct>\r
+<ownturnover>18.0</ownturnover><oppturnover>13.0</oppturnover>\r
+<marginturnover>-5.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Seattle</team>\r
+<ownpoints>60.0</ownpoints><oppoints>70.0</oppoints>\r
+<ownfield>.374</ownfield><oppfield>.485</oppfield>\r
+<ownfgpct>.258</ownfgpct><oppfgpct>.267</oppfgpct>\r
+<ownturnover>12.5</ownturnover><oppturnover>15.0</oppturnover>\r
+<marginturnover>+2.5</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Washington</team>\r
+<ownpoints>74.0</ownpoints><oppoints>70.0</oppoints>\r
+<ownfield>.377</ownfield><oppfield>.369</oppfield>\r
+<ownfgpct>.333</ownfgpct><oppfgpct>.385</oppfgpct>\r
+<ownturnover>*11.0</ownturnover><oppturnover>14.0</oppturnover>\r
+<marginturnover>+3.0</marginturnover>\r
+</listing>\r
+<time_stamp> May 28, 2003, at 01:02 PM ET </time_stamp>\r
+</message>\r
index 6901dfab22560d8fdc71a169adf51e414300881e..57bc2ec3ce58241c63215290d7924c34f06b63c3 100644 (file)
@@ -200,7 +200,7 @@ dtds =
     "NFL_Team_Stats_XML.dtd",
     "Transactions_XML.dtd",
     "Weekly_Sched_XML.dtd",
-    "WNBA_Team_Leaders_XML.dtd", -- no dtd
+    "WNBA_Team_Leaders_XML.dtd",
     "WNBA3PPctXML.dtd", -- no dtd
     "WNBAAssistsXML.dtd", -- no dtd
     "WNBABlocksXML.dtd", -- no dtd
@@ -433,7 +433,8 @@ sport_info_test_files =
     "NFL_Roster_XML.xml",
     "NFL_Team_Stats_XML.xml",
     "Transactions_XML.xml",
-    "Weekly_Sched_XML.xml"
+    "Weekly_Sched_XML.xml",
+    "WNBA_Team_Leaders_XML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/WNBA_Team_Leaders_XML.dtd b/test/xml/sportinfo/WNBA_Team_Leaders_XML.dtd
new file mode 100644 (file)
index 0000000..bdc1211
--- /dev/null
@@ -0,0 +1,52 @@
+<!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  (team ,  (ownpoints | oppoints | ownfield | oppfield | ownfgpct | oppfgpct | ownturnover | oppturnover | marginturnover | offrebound | defrebound | totrebound | ownwinloss | oppwinloss | otwinloss | threeptswinloss | tenptswinloss )* )>\r
+\r
+<!ELEMENT team  (#PCDATA )>\r
+\r
+<!ELEMENT ownpoints  (#PCDATA )>\r
+\r
+<!ELEMENT oppoints  (#PCDATA )>\r
+\r
+<!ELEMENT ownfield  (#PCDATA )>\r
+\r
+<!ELEMENT oppfield  (#PCDATA )>\r
+\r
+<!ELEMENT ownfgpct  (#PCDATA )>\r
+\r
+<!ELEMENT oppfgpct  (#PCDATA )>\r
+\r
+<!ELEMENT ownturnover  (#PCDATA )>\r
+\r
+<!ELEMENT oppturnover  (#PCDATA )>\r
+\r
+<!ELEMENT marginturnover  (#PCDATA )>\r
+\r
+<!ELEMENT offrebound  (#PCDATA )>\r
+\r
+<!ELEMENT defrebound  (#PCDATA )>\r
+\r
+<!ELEMENT totrebound  (#PCDATA )>\r
+\r
+<!ELEMENT ownwinloss  (#PCDATA )>\r
+\r
+<!ELEMENT oppwinloss  (#PCDATA )>\r
+\r
+<!ELEMENT otwinloss  (#PCDATA )>\r
+\r
+<!ELEMENT threeptswinloss  (#PCDATA )>\r
+\r
+<!ELEMENT tenptswinloss  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/WNBA_Team_Leaders_XML.xml b/test/xml/sportinfo/WNBA_Team_Leaders_XML.xml
new file mode 100644 (file)
index 0000000..6456009
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Leaders 1.0/EN" "WNBA_Team_Leaders_XML.dtd">\r
+<message>\r
+<XML_File_ID>222572</XML_File_ID>\r
+<heading>BUX%TEAM-LEADERS</heading>\r
+<category>Statistics</category>\r
+<sport>BASK-W</sport>\r
+<title>2003 WNBA Team Leaders</title>\r
+<listing>\r
+<team>Charlotte</team>\r
+<ownpoints>70.0</ownpoints><oppoints>74.0</oppoints>\r
+<ownfield>.369</ownfield><oppfield>.377</oppfield>\r
+<ownfgpct>.385</ownfgpct><oppfgpct>.333</oppfgpct>\r
+<ownturnover>14.0</ownturnover><oppturnover>11.0</oppturnover>\r
+<marginturnover>-3.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Cleveland</team>\r
+<ownpoints>71.0</ownpoints><oppoints>79.0</oppoints>\r
+<ownfield>.362</ownfield><oppfield>.405</oppfield>\r
+<ownfgpct>.316</ownfgpct><oppfgpct>.385</oppfgpct>\r
+<ownturnover>13.0</ownturnover><oppturnover>9.0</oppturnover>\r
+<marginturnover>-4.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Connecticut</team>\r
+<ownpoints>73.0</ownpoints><oppoints>82.0</oppoints>\r
+<ownfield>.345</ownfield><oppfield>.389</oppfield>\r
+<ownfgpct>.381</ownfgpct><oppfgpct>.125</oppfgpct>\r
+<ownturnover>15.0</ownturnover><oppturnover>14.0</oppturnover>\r
+<marginturnover>-1.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Houston</team>\r
+<ownpoints>72.0</ownpoints><oppoints>63.0</oppoints>\r
+<ownfield>.500</ownfield><oppfield>.398</oppfield>\r
+<ownfgpct>.235</ownfgpct><oppfgpct>.379</oppfgpct>\r
+<ownturnover>14.0</ownturnover><oppturnover>10.5</oppturnover>\r
+<marginturnover>-3.5</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Los Angeles</team>\r
+<ownpoints>*80.5</ownpoints><oppoints>72.0</oppoints>\r
+<ownfield>.397</ownfield><oppfield>.353</oppfield>\r
+<ownfgpct>.241</ownfgpct><oppfgpct>.350</oppfgpct>\r
+<ownturnover>11.5</ownturnover><oppturnover>14.0</oppturnover>\r
+<marginturnover>+2.5</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Minnesota</team>\r
+<ownpoints>72.0</ownpoints><oppoints>71.0</oppoints>\r
+<ownfield>*.510</ownfield><oppfield>.451</oppfield>\r
+<ownfgpct>.462</ownfgpct><oppfgpct>.357</oppfgpct>\r
+<ownturnover>21.0</ownturnover><oppturnover>12.0</oppturnover>\r
+<marginturnover>-9.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Phoenix</team>\r
+<ownpoints>59.0</ownpoints><oppoints>67.0</oppoints>\r
+<ownfield>.336</ownfield><oppfield>.449</oppfield>\r
+<ownfgpct>.263</ownfgpct><oppfgpct>.389</oppfgpct>\r
+<ownturnover>11.5</ownturnover><oppturnover>*17.5</oppturnover>\r
+<marginturnover>*+6.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Sacramento</team>\r
+<ownpoints>68.0</ownpoints><oppoints>64.0</oppoints>\r
+<ownfield>.427</ownfield><oppfield>.400</oppfield>\r
+<ownfgpct>.375</ownfgpct><oppfgpct>.318</oppfgpct>\r
+<ownturnover>15.5</ownturnover><oppturnover>*17.5</oppturnover>\r
+<marginturnover>+2.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>San Antonio</team>\r
+<ownpoints>65.0</ownpoints><oppoints>*56.0</oppoints>\r
+<ownfield>.467</ownfield><oppfield>*.313</oppfield>\r
+<ownfgpct>*.500</ownfgpct><oppfgpct>*.083</oppfgpct>\r
+<ownturnover>18.0</ownturnover><oppturnover>13.0</oppturnover>\r
+<marginturnover>-5.0</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Seattle</team>\r
+<ownpoints>60.0</ownpoints><oppoints>70.0</oppoints>\r
+<ownfield>.374</ownfield><oppfield>.485</oppfield>\r
+<ownfgpct>.258</ownfgpct><oppfgpct>.267</oppfgpct>\r
+<ownturnover>12.5</ownturnover><oppturnover>15.0</oppturnover>\r
+<marginturnover>+2.5</marginturnover>\r
+</listing>\r
+<listing>\r
+<team>Washington</team>\r
+<ownpoints>74.0</ownpoints><oppoints>70.0</oppoints>\r
+<ownfield>.377</ownfield><oppfield>.369</oppfield>\r
+<ownfgpct>.333</ownfgpct><oppfgpct>.385</oppfgpct>\r
+<ownturnover>*11.0</ownturnover><oppturnover>14.0</oppturnover>\r
+<marginturnover>+3.0</marginturnover>\r
+</listing>\r
+<time_stamp> May 28, 2003, at 01:02 PM ET </time_stamp>\r
+</message>\r