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

index cd849264ac2d1c4d445f327a2b3f2b369df0cc0d..ca7b1a26097f84f6ec0f365016e7865ac2571277 100644 (file)
@@ -316,6 +316,8 @@ NFLGiveTakeXML.dtd
 NFLInside20XML.dtd
 .IP \[bu]
 NFLKickoffsXML.dtd
+.IP \[bu]
+NFLMondayNightXML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/NFLMondayNightXML.dtd b/schema/NFLMondayNightXML.dtd
new file mode 100644 (file)
index 0000000..78761f1
--- /dev/null
@@ -0,0 +1,28 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , conference+ , 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 conference  (listing+ )>\r
+<!ATTLIST conference  name CDATA  #REQUIRED >\r
+<!ELEMENT listing  (team , W , L , T , pct )>\r
+\r
+<!ELEMENT team  (#PCDATA )>\r
+\r
+<!ELEMENT W  (#PCDATA )>\r
+\r
+<!ELEMENT L  (#PCDATA )>\r
+\r
+<!ELEMENT T  (#PCDATA )>\r
+\r
+<!ELEMENT pct  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/NFLMondayNightXML/NFLMondayNightXML.xml b/schemagen/NFLMondayNightXML/NFLMondayNightXML.xml
new file mode 100644 (file)
index 0000000..32b9587
--- /dev/null
@@ -0,0 +1,231 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLMondayNightXML.dtd">\r
+<message>\r
+<XML_File_ID>9917</XML_File_ID>\r
+<heading>ABX%NFL-MONDAY-NIGHT</heading>\r
+<category>Statistics</category>\r
+<sport>NFL</sport>\r
+<title>NFL Statistics - Monday Night Records of NFL Teams</title>\r
+<conference name="Team (AFC)">\r
+<listing>\r
+<team>Baltimore Ravens</team>\r
+<W>1</W>\r
+<L>0</L>\r
+<T>0</T>\r
+<pct>1.000</pct>\r
+</listing>\r
+<listing>\r
+<team>Jacksonville Jaguars</team>\r
+<W>5</W>\r
+<L>2</L>\r
+<T>0</T>\r
+<pct>.714</pct>\r
+</listing>\r
+<listing>\r
+<team>Seattle Seahawks</team>\r
+<W>12</W>\r
+<L>6</L>\r
+<T>0</T>\r
+<pct>.667</pct>\r
+</listing>\r
+<listing>\r
+<team>Oakland Raiders</team>\r
+<W>34</W>\r
+<L>18</L>\r
+<T>1</T>\r
+<pct>.651</pct>\r
+</listing>\r
+<listing>\r
+<team>Pittsburgh Steelers</team>\r
+<W>29</W>\r
+<L>18</L>\r
+<T>0</T>\r
+<pct>.617</pct>\r
+</listing>\r
+<listing>\r
+<team>Indianapolis Colts</team>\r
+<W>12</W>\r
+<L>8</L>\r
+<T>0</T>\r
+<pct>.600</pct>\r
+</listing>\r
+<listing>\r
+<team>Kansas City Chiefs</team>\r
+<W>17</W>\r
+<L>13</L>\r
+<T>0</T>\r
+<pct>.567</pct>\r
+</listing>\r
+<listing>\r
+<team>Miami Dolphins</team>\r
+<W>35</W>\r
+<L>29</L>\r
+<T>0</T>\r
+<pct>.547</pct>\r
+</listing>\r
+<listing>\r
+<team>Cleveland Browns</team>\r
+<W>13</W>\r
+<L>11</L>\r
+<T>0</T>\r
+<pct>.542</pct>\r
+</listing>\r
+<listing>\r
+<team>San Diego Chargers</team>\r
+<W>14</W>\r
+<L>12</L>\r
+<T>0</T>\r
+<pct>.538</pct>\r
+</listing>\r
+<listing>\r
+<team>Tennessee Titans</team>\r
+<W>14</W>\r
+<L>13</L>\r
+<T>0</T>\r
+<pct>.519</pct>\r
+</listing>\r
+<listing>\r
+<team>Buffalo Bills</team>\r
+<W>17</W>\r
+<L>20</L>\r
+<T>0</T>\r
+<pct>.459</pct>\r
+</listing>\r
+<listing>\r
+<team>Denver Broncos</team>\r
+<W>21</W>\r
+<L>25</L>\r
+<T>1</T>\r
+<pct>.457</pct>\r
+</listing>\r
+<listing>\r
+<team>New York Jets</team>\r
+<W>14</W>\r
+<L>18</L>\r
+<T>0</T>\r
+<pct>.438</pct>\r
+</listing>\r
+<listing>\r
+<team>New England Patriots</team>\r
+<W>8</W>\r
+<L>18</L>\r
+<T>0</T>\r
+<pct>.308</pct>\r
+</listing>\r
+<listing>\r
+<team>Cincinnati Bengals</team>\r
+<W>7</W>\r
+<L>16</L>\r
+<T>0</T>\r
+<pct>.304</pct>\r
+</listing>\r
+</conference>\r
+<conference name="Team (NFC)">\r
+<listing>\r
+<team>Carolina Panthers</team>\r
+<W>2</W>\r
+<L>1</L>\r
+<T>0</T>\r
+<pct>.667</pct>\r
+</listing>\r
+<listing>\r
+<team>San Francisco 49ers</team>\r
+<W>35</W>\r
+<L>20</L>\r
+<T>0</T>\r
+<pct>.636</pct>\r
+</listing>\r
+<listing>\r
+<team>Dallas Cowboys</team>\r
+<W>35</W>\r
+<L>26</L>\r
+<T>0</T>\r
+<pct>.574</pct>\r
+</listing>\r
+<listing>\r
+<team>Tampa Bay Buccaneers</team>\r
+<W>5</W>\r
+<L>4</L>\r
+<T>0</T>\r
+<pct>.556</pct>\r
+</listing>\r
+<listing>\r
+<team>Minnesota Vikings</team>\r
+<W>21</W>\r
+<L>19</L>\r
+<T>0</T>\r
+<pct>.525</pct>\r
+</listing>\r
+<listing>\r
+<team>Philadelphia Eagles</team>\r
+<W>15</W>\r
+<L>15</L>\r
+<T>0</T>\r
+<pct>.500</pct>\r
+</listing>\r
+<listing>\r
+<team>Green Bay Packers</team>\r
+<W>17</W>\r
+<L>18</L>\r
+<T>1</T>\r
+<pct>.486</pct>\r
+</listing>\r
+<listing>\r
+<team>Washington Redskins</team>\r
+<W>24</W>\r
+<L>26</L>\r
+<T>0</T>\r
+<pct>.480</pct>\r
+</listing>\r
+<listing>\r
+<team>Detroit Lions</team>\r
+<W>11</W>\r
+<L>13</L>\r
+<T>1</T>\r
+<pct>.460</pct>\r
+</listing>\r
+<listing>\r
+<team>St. Louis Rams</team>\r
+<W>19</W>\r
+<L>23</L>\r
+<T>0</T>\r
+<pct>.452</pct>\r
+</listing>\r
+<listing>\r
+<team>New York Giants</team>\r
+<W>15</W>\r
+<L>26</L>\r
+<T>1</T>\r
+<pct>.369</pct>\r
+</listing>\r
+<listing>\r
+<team>Chicago Bears</team>\r
+<W>16</W>\r
+<L>28</L>\r
+<T>0</T>\r
+<pct>.364</pct>\r
+</listing>\r
+<listing>\r
+<team>Arizona Cardinals</team>\r
+<W>5</W>\r
+<L>10</L>\r
+<T>1</T>\r
+<pct>.344</pct>\r
+</listing>\r
+<listing>\r
+<team>New Orleans Saints</team>\r
+<W>6</W>\r
+<L>12</L>\r
+<T>0</T>\r
+<pct>.333</pct>\r
+</listing>\r
+<listing>\r
+<team>Atlanta Falcons</team>\r
+<W>6</W>\r
+<L>17</L>\r
+<T>0</T>\r
+<pct>.261</pct>\r
+</listing>\r
+</conference>\r
+<time_stamp> November 30, 2001, at 04:18 PM ET </time_stamp>\r
+</message>\r
index 8ab5c0f49988f88a2f205904b9812fcb06e1b2f8..29c3138b43aa0ccf5605727b5c6cbf56a382fe03 100644 (file)
@@ -178,7 +178,7 @@ dtds =
     "NFLInside20XML.dtd",
     "NFLInterceptionLeadersXML.dtd", -- no dtd
     "NFLKickoffsXML.dtd",
-    "NFLMondayNightXML.dtd", -- no dtd
+    "NFLMondayNightXML.dtd",
     "NFLPassingLeadersXML.dtd", -- no dtd
     "NFLPassLeadXML.dtd", -- no dtd
     "NFLQBStartsXML.dtd", -- no dtd
@@ -419,7 +419,8 @@ sport_info_test_files =
     "NFLFumbleLeaderXML.xml",
     "NFLGiveTakeXML.xml",
     "NFLInside20XML.xml",
-    "NFLKickoffsXML.xml"
+    "NFLKickoffsXML.xml",
+    "NFLMondayNightXML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/NFLMondayNightXML.dtd b/test/xml/sportinfo/NFLMondayNightXML.dtd
new file mode 100644 (file)
index 0000000..78761f1
--- /dev/null
@@ -0,0 +1,28 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title , conference+ , 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 conference  (listing+ )>\r
+<!ATTLIST conference  name CDATA  #REQUIRED >\r
+<!ELEMENT listing  (team , W , L , T , pct )>\r
+\r
+<!ELEMENT team  (#PCDATA )>\r
+\r
+<!ELEMENT W  (#PCDATA )>\r
+\r
+<!ELEMENT L  (#PCDATA )>\r
+\r
+<!ELEMENT T  (#PCDATA )>\r
+\r
+<!ELEMENT pct  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/NFLMondayNightXML.xml b/test/xml/sportinfo/NFLMondayNightXML.xml
new file mode 100644 (file)
index 0000000..32b9587
--- /dev/null
@@ -0,0 +1,231 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLMondayNightXML.dtd">\r
+<message>\r
+<XML_File_ID>9917</XML_File_ID>\r
+<heading>ABX%NFL-MONDAY-NIGHT</heading>\r
+<category>Statistics</category>\r
+<sport>NFL</sport>\r
+<title>NFL Statistics - Monday Night Records of NFL Teams</title>\r
+<conference name="Team (AFC)">\r
+<listing>\r
+<team>Baltimore Ravens</team>\r
+<W>1</W>\r
+<L>0</L>\r
+<T>0</T>\r
+<pct>1.000</pct>\r
+</listing>\r
+<listing>\r
+<team>Jacksonville Jaguars</team>\r
+<W>5</W>\r
+<L>2</L>\r
+<T>0</T>\r
+<pct>.714</pct>\r
+</listing>\r
+<listing>\r
+<team>Seattle Seahawks</team>\r
+<W>12</W>\r
+<L>6</L>\r
+<T>0</T>\r
+<pct>.667</pct>\r
+</listing>\r
+<listing>\r
+<team>Oakland Raiders</team>\r
+<W>34</W>\r
+<L>18</L>\r
+<T>1</T>\r
+<pct>.651</pct>\r
+</listing>\r
+<listing>\r
+<team>Pittsburgh Steelers</team>\r
+<W>29</W>\r
+<L>18</L>\r
+<T>0</T>\r
+<pct>.617</pct>\r
+</listing>\r
+<listing>\r
+<team>Indianapolis Colts</team>\r
+<W>12</W>\r
+<L>8</L>\r
+<T>0</T>\r
+<pct>.600</pct>\r
+</listing>\r
+<listing>\r
+<team>Kansas City Chiefs</team>\r
+<W>17</W>\r
+<L>13</L>\r
+<T>0</T>\r
+<pct>.567</pct>\r
+</listing>\r
+<listing>\r
+<team>Miami Dolphins</team>\r
+<W>35</W>\r
+<L>29</L>\r
+<T>0</T>\r
+<pct>.547</pct>\r
+</listing>\r
+<listing>\r
+<team>Cleveland Browns</team>\r
+<W>13</W>\r
+<L>11</L>\r
+<T>0</T>\r
+<pct>.542</pct>\r
+</listing>\r
+<listing>\r
+<team>San Diego Chargers</team>\r
+<W>14</W>\r
+<L>12</L>\r
+<T>0</T>\r
+<pct>.538</pct>\r
+</listing>\r
+<listing>\r
+<team>Tennessee Titans</team>\r
+<W>14</W>\r
+<L>13</L>\r
+<T>0</T>\r
+<pct>.519</pct>\r
+</listing>\r
+<listing>\r
+<team>Buffalo Bills</team>\r
+<W>17</W>\r
+<L>20</L>\r
+<T>0</T>\r
+<pct>.459</pct>\r
+</listing>\r
+<listing>\r
+<team>Denver Broncos</team>\r
+<W>21</W>\r
+<L>25</L>\r
+<T>1</T>\r
+<pct>.457</pct>\r
+</listing>\r
+<listing>\r
+<team>New York Jets</team>\r
+<W>14</W>\r
+<L>18</L>\r
+<T>0</T>\r
+<pct>.438</pct>\r
+</listing>\r
+<listing>\r
+<team>New England Patriots</team>\r
+<W>8</W>\r
+<L>18</L>\r
+<T>0</T>\r
+<pct>.308</pct>\r
+</listing>\r
+<listing>\r
+<team>Cincinnati Bengals</team>\r
+<W>7</W>\r
+<L>16</L>\r
+<T>0</T>\r
+<pct>.304</pct>\r
+</listing>\r
+</conference>\r
+<conference name="Team (NFC)">\r
+<listing>\r
+<team>Carolina Panthers</team>\r
+<W>2</W>\r
+<L>1</L>\r
+<T>0</T>\r
+<pct>.667</pct>\r
+</listing>\r
+<listing>\r
+<team>San Francisco 49ers</team>\r
+<W>35</W>\r
+<L>20</L>\r
+<T>0</T>\r
+<pct>.636</pct>\r
+</listing>\r
+<listing>\r
+<team>Dallas Cowboys</team>\r
+<W>35</W>\r
+<L>26</L>\r
+<T>0</T>\r
+<pct>.574</pct>\r
+</listing>\r
+<listing>\r
+<team>Tampa Bay Buccaneers</team>\r
+<W>5</W>\r
+<L>4</L>\r
+<T>0</T>\r
+<pct>.556</pct>\r
+</listing>\r
+<listing>\r
+<team>Minnesota Vikings</team>\r
+<W>21</W>\r
+<L>19</L>\r
+<T>0</T>\r
+<pct>.525</pct>\r
+</listing>\r
+<listing>\r
+<team>Philadelphia Eagles</team>\r
+<W>15</W>\r
+<L>15</L>\r
+<T>0</T>\r
+<pct>.500</pct>\r
+</listing>\r
+<listing>\r
+<team>Green Bay Packers</team>\r
+<W>17</W>\r
+<L>18</L>\r
+<T>1</T>\r
+<pct>.486</pct>\r
+</listing>\r
+<listing>\r
+<team>Washington Redskins</team>\r
+<W>24</W>\r
+<L>26</L>\r
+<T>0</T>\r
+<pct>.480</pct>\r
+</listing>\r
+<listing>\r
+<team>Detroit Lions</team>\r
+<W>11</W>\r
+<L>13</L>\r
+<T>1</T>\r
+<pct>.460</pct>\r
+</listing>\r
+<listing>\r
+<team>St. Louis Rams</team>\r
+<W>19</W>\r
+<L>23</L>\r
+<T>0</T>\r
+<pct>.452</pct>\r
+</listing>\r
+<listing>\r
+<team>New York Giants</team>\r
+<W>15</W>\r
+<L>26</L>\r
+<T>1</T>\r
+<pct>.369</pct>\r
+</listing>\r
+<listing>\r
+<team>Chicago Bears</team>\r
+<W>16</W>\r
+<L>28</L>\r
+<T>0</T>\r
+<pct>.364</pct>\r
+</listing>\r
+<listing>\r
+<team>Arizona Cardinals</team>\r
+<W>5</W>\r
+<L>10</L>\r
+<T>1</T>\r
+<pct>.344</pct>\r
+</listing>\r
+<listing>\r
+<team>New Orleans Saints</team>\r
+<W>6</W>\r
+<L>12</L>\r
+<T>0</T>\r
+<pct>.333</pct>\r
+</listing>\r
+<listing>\r
+<team>Atlanta Falcons</team>\r
+<W>6</W>\r
+<L>17</L>\r
+<T>0</T>\r
+<pct>.261</pct>\r
+</listing>\r
+</conference>\r
+<time_stamp> November 30, 2001, at 04:18 PM ET </time_stamp>\r
+</message>\r