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

index d2fba150ca5ed17723cada4cd9eb996e1a5d75be..9424e718f877868bd949634f4b032645f703b4d8 100644 (file)
@@ -138,6 +138,8 @@ CBASK_FTPctXML.dtd
 Cbask_Indv_Scoring_XML.dtd
 .IP \[bu]
 CBASK_MinutesXML.dtd
+.IP \[bu]
+Cbask_Polls_XML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/Cbask_Polls_XML.dtd b/schema/Cbask_Polls_XML.dtd
new file mode 100644 (file)
index 0000000..34482d6
--- /dev/null
@@ -0,0 +1,25 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , Top_Listings+ , Others_Receiving_Votes , 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 Top_Listings  (Record , Points , Previous_Rank )>\r
+<!ATTLIST Top_Listings  Team_and_Votes CDATA  #REQUIRED\r
+                        Rank           CDATA  #REQUIRED >\r
+<!ELEMENT Record  (#PCDATA )>\r
+\r
+<!ELEMENT Points  (#PCDATA )>\r
+\r
+<!ELEMENT Previous_Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Others_Receiving_Votes  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/Cbask_Polls_XML/Cbask_Polls_XML.xml b/schemagen/Cbask_Polls_XML/Cbask_Polls_XML.xml
new file mode 100644 (file)
index 0000000..1bd99bc
--- /dev/null
@@ -0,0 +1,142 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Cbask_Polls_XML.dtd">\r
+<message>\r
+<XML_File_ID>17</XML_File_ID>\r
+<heading>AEB!ESPN-USA-TODAY-POLL</heading>\r
+<category>Miscellaneous</category>\r
+<sport>CBASK</sport>\r
+<title>USA Today/ESPN Men's Top-25 College Basketball Poll</title>\r
+<Top_Listings Rank="1" Team_and_Votes="Kansas Jayhawks (21)">\r
+<Record>23-2</Record>\r
+<Points>763</Points>\r
+<Previous_Rank>2</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="2" Team_and_Votes="Maryland Terrapins (9)">\r
+<Record>21-3</Record>\r
+<Points>748</Points>\r
+<Previous_Rank>3</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="3" Team_and_Votes="Duke Blue Devils (1)">\r
+<Record>23-2</Record>\r
+<Points>719</Points>\r
+<Previous_Rank>1</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="4" Team_and_Votes="Cincinnati Bearcats">\r
+<Record>24-2</Record>\r
+<Points>675</Points>\r
+<Previous_Rank>5</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="5" Team_and_Votes="Oklahoma Sooners">\r
+<Record>20-4</Record>\r
+<Points>644</Points>\r
+<Previous_Rank>4</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="6" Team_and_Votes="Alabama Crimson Tide">\r
+<Record>22-4</Record>\r
+<Points>611</Points>\r
+<Previous_Rank>7</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="7" Team_and_Votes="Gonzaga Bulldogs">\r
+<Record>24-3</Record>\r
+<Points>557</Points>\r
+<Previous_Rank>8</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="8" Team_and_Votes="Florida Gators">\r
+<Record>19-5</Record>\r
+<Points>540</Points>\r
+<Previous_Rank>6</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="9" Team_and_Votes="Marquette Golden Eagles">\r
+<Record>22-3</Record>\r
+<Points>516</Points>\r
+<Previous_Rank>12</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="10" Team_and_Votes="Pittsburgh Panthers">\r
+<Record>22-4</Record>\r
+<Points>429</Points>\r
+<Previous_Rank>16</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="11" Team_and_Votes="Stanford Cardinal">\r
+<Record>17-6</Record>\r
+<Points>408</Points>\r
+<Previous_Rank>14</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="12" Team_and_Votes="Kentucky Wildcats">\r
+<Record>17-7</Record>\r
+<Points>361</Points>\r
+<Previous_Rank>9</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="13" Team_and_Votes="Miami-Florida Hurricanes">\r
+<Record>21-5</Record>\r
+<Points>348</Points>\r
+<Previous_Rank>11</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="14" Team_and_Votes="Oklahoma State Cowboys">\r
+<Record>20-6</Record>\r
+<Points>325</Points>\r
+<Previous_Rank>15</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="15" Team_and_Votes="Virginia Cavaliers">\r
+<Record>16-6</Record>\r
+<Points>307</Points>\r
+<Previous_Rank>13</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="16" Team_and_Votes="Arizona Wildcats">\r
+<Record>17-8</Record>\r
+<Points>304</Points>\r
+<Previous_Rank>10</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="17" Team_and_Votes="Oregon Ducks">\r
+<Record>18-7</Record>\r
+<Points>249</Points>\r
+<Previous_Rank>18</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="18" Team_and_Votes="Ohio State Buckeyes">\r
+<Record>18-5</Record>\r
+<Points>214</Points>\r
+<Previous_Rank>20</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="19" Team_and_Votes="Illionis Fighting Illini">\r
+<Record>19-7</Record>\r
+<Points>207</Points>\r
+<Previous_Rank>19</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="20" Team_and_Votes="Georgia Bulldogs">\r
+<Record>19-7</Record>\r
+<Points>204</Points>\r
+<Previous_Rank>22</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="21" Team_and_Votes="Wake Forest Deamon Deacons">\r
+<Record>17-8</Record>\r
+<Points>155</Points>\r
+<Previous_Rank>17</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="22" Team_and_Votes="Southern California Trojans">\r
+<Record>18-6</Record>\r
+<Points>151</Points>\r
+<Previous_Rank>25</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="23" Team_and_Votes="Indiana Hoosiers">\r
+<Record>17-8</Record>\r
+<Points>130</Points>\r
+<Previous_Rank>24</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="24" Team_and_Votes="Xavier Muskateers">\r
+<Record>19-4</Record>\r
+<Points>90</Points>\r
+<Previous_Rank>NR</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="25" Team_and_Votes="Syracuse Orangemen">\r
+<Record>19-7</Record>\r
+<Points>69</Points>\r
+<Previous_Rank>21</Previous_Rank>\r
+</Top_Listings>\r
+<Others_Receiving_Votes>\r
+Western Kentucky 68, North Carolina State 57, U-C-L-A\r
+46, Hawaii 31, Connecticut 27, Butler 26, Tulsa 14, Mississippi 13, Texas 12,\r
+Kent State 11, Arizona State 8, Utah 7, Southern Illinois 6, Texas Tech 6,\r
+Wyoming 5, Valparaiso 3, California 2, Minnesota 2, Mississippi State 2, Utah\r
+State 2, Hampton 1, Notre Dame 1, Rutgers 1.\r
+</Others_Receiving_Votes>\r
+<time_stamp> February 19, 2002, at 02:47 PM ET </time_stamp>\r
+</message>\r
index a799ae708d7223dba0cb2f51147581f7fcdee829..276b9caf16b601826d6eb32daa09cb93d9949221 100644 (file)
@@ -82,7 +82,7 @@ dtds =
     "Cbask_Indv_Scoring_XML.dtd",
     "Cbask_Indv_Shooting_XML.dtd", -- no dtd
     "CBASK_MinutesXML.dtd",
-    "Cbask_Polls_XML.dtd", -- no dtd
+    "Cbask_Polls_XML.dtd",
     "CBASK_ReboundsXML.dtd", -- no dtd
     "CBASK_ScoringLeadersXML.dtd", -- no dtd
     "CBASK_StealsXML.dtd", -- no dtd
@@ -329,7 +329,8 @@ sport_info_test_files =
     "test/xml/sportinfo/CBASK_FoulsXML.xml",
     "test/xml/sportinfo/CBASK_FTPctXML.xml",
     "test/xml/sportinfo/Cbask_Indv_Scoring_XML.xml",
-    "test/xml/sportinfo/CBASK_MinutesXML.xml"
+    "test/xml/sportinfo/CBASK_MinutesXML.xml",
+    "test/xml/sportinfo/Cbask_Polls_XML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/Cbask_Polls_XML.dtd b/test/xml/sportinfo/Cbask_Polls_XML.dtd
new file mode 100644 (file)
index 0000000..34482d6
--- /dev/null
@@ -0,0 +1,25 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , Top_Listings+ , Others_Receiving_Votes , 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 Top_Listings  (Record , Points , Previous_Rank )>\r
+<!ATTLIST Top_Listings  Team_and_Votes CDATA  #REQUIRED\r
+                        Rank           CDATA  #REQUIRED >\r
+<!ELEMENT Record  (#PCDATA )>\r
+\r
+<!ELEMENT Points  (#PCDATA )>\r
+\r
+<!ELEMENT Previous_Rank  (#PCDATA )>\r
+\r
+<!ELEMENT Others_Receiving_Votes  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/Cbask_Polls_XML.xml b/test/xml/sportinfo/Cbask_Polls_XML.xml
new file mode 100644 (file)
index 0000000..7c2cdfd
--- /dev/null
@@ -0,0 +1,142 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Cbask_Polls_XML.dtd">\r
+<message>\r
+<XML_File_ID>9191117</XML_File_ID>\r
+<heading>AEB!ESPN-USA-TODAY-POLL</heading>\r
+<category>Miscellaneous</category>\r
+<sport>CBASK</sport>\r
+<title>USA Today/ESPN Men's Top-25 College Basketball Poll</title>\r
+<Top_Listings Rank="1" Team_and_Votes="Kansas Jayhawks (21)">\r
+<Record>23-2</Record>\r
+<Points>763</Points>\r
+<Previous_Rank>2</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="2" Team_and_Votes="Maryland Terrapins (9)">\r
+<Record>21-3</Record>\r
+<Points>748</Points>\r
+<Previous_Rank>3</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="3" Team_and_Votes="Duke Blue Devils (1)">\r
+<Record>23-2</Record>\r
+<Points>719</Points>\r
+<Previous_Rank>1</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="4" Team_and_Votes="Cincinnati Bearcats">\r
+<Record>24-2</Record>\r
+<Points>675</Points>\r
+<Previous_Rank>5</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="5" Team_and_Votes="Oklahoma Sooners">\r
+<Record>20-4</Record>\r
+<Points>644</Points>\r
+<Previous_Rank>4</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="6" Team_and_Votes="Alabama Crimson Tide">\r
+<Record>22-4</Record>\r
+<Points>611</Points>\r
+<Previous_Rank>7</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="7" Team_and_Votes="Gonzaga Bulldogs">\r
+<Record>24-3</Record>\r
+<Points>557</Points>\r
+<Previous_Rank>8</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="8" Team_and_Votes="Florida Gators">\r
+<Record>19-5</Record>\r
+<Points>540</Points>\r
+<Previous_Rank>6</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="9" Team_and_Votes="Marquette Golden Eagles">\r
+<Record>22-3</Record>\r
+<Points>516</Points>\r
+<Previous_Rank>12</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="10" Team_and_Votes="Pittsburgh Panthers">\r
+<Record>22-4</Record>\r
+<Points>429</Points>\r
+<Previous_Rank>16</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="11" Team_and_Votes="Stanford Cardinal">\r
+<Record>17-6</Record>\r
+<Points>408</Points>\r
+<Previous_Rank>14</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="12" Team_and_Votes="Kentucky Wildcats">\r
+<Record>17-7</Record>\r
+<Points>361</Points>\r
+<Previous_Rank>9</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="13" Team_and_Votes="Miami-Florida Hurricanes">\r
+<Record>21-5</Record>\r
+<Points>348</Points>\r
+<Previous_Rank>11</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="14" Team_and_Votes="Oklahoma State Cowboys">\r
+<Record>20-6</Record>\r
+<Points>325</Points>\r
+<Previous_Rank>15</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="15" Team_and_Votes="Virginia Cavaliers">\r
+<Record>16-6</Record>\r
+<Points>307</Points>\r
+<Previous_Rank>13</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="16" Team_and_Votes="Arizona Wildcats">\r
+<Record>17-8</Record>\r
+<Points>304</Points>\r
+<Previous_Rank>10</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="17" Team_and_Votes="Oregon Ducks">\r
+<Record>18-7</Record>\r
+<Points>249</Points>\r
+<Previous_Rank>18</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="18" Team_and_Votes="Ohio State Buckeyes">\r
+<Record>18-5</Record>\r
+<Points>214</Points>\r
+<Previous_Rank>20</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="19" Team_and_Votes="Illionis Fighting Illini">\r
+<Record>19-7</Record>\r
+<Points>207</Points>\r
+<Previous_Rank>19</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="20" Team_and_Votes="Georgia Bulldogs">\r
+<Record>19-7</Record>\r
+<Points>204</Points>\r
+<Previous_Rank>22</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="21" Team_and_Votes="Wake Forest Deamon Deacons">\r
+<Record>17-8</Record>\r
+<Points>155</Points>\r
+<Previous_Rank>17</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="22" Team_and_Votes="Southern California Trojans">\r
+<Record>18-6</Record>\r
+<Points>151</Points>\r
+<Previous_Rank>25</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="23" Team_and_Votes="Indiana Hoosiers">\r
+<Record>17-8</Record>\r
+<Points>130</Points>\r
+<Previous_Rank>24</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="24" Team_and_Votes="Xavier Muskateers">\r
+<Record>19-4</Record>\r
+<Points>90</Points>\r
+<Previous_Rank>NR</Previous_Rank>\r
+</Top_Listings>\r
+<Top_Listings Rank="25" Team_and_Votes="Syracuse Orangemen">\r
+<Record>19-7</Record>\r
+<Points>69</Points>\r
+<Previous_Rank>21</Previous_Rank>\r
+</Top_Listings>\r
+<Others_Receiving_Votes>\r
+Western Kentucky 68, North Carolina State 57, U-C-L-A\r
+46, Hawaii 31, Connecticut 27, Butler 26, Tulsa 14, Mississippi 13, Texas 12,\r
+Kent State 11, Arizona State 8, Utah 7, Southern Illinois 6, Texas Tech 6,\r
+Wyoming 5, Valparaiso 3, California 2, Minnesota 2, Mississippi State 2, Utah\r
+State 2, Hampton 1, Notre Dame 1, Rutgers 1.\r
+</Others_Receiving_Votes>\r
+<time_stamp> February 19, 2002, at 02:47 PM ET </time_stamp>\r
+</message>\r