]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add SportInfo support for NFLTopPuntReturnXML.dtd.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 6 Nov 2014 19:28:58 +0000 (14:28 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 6 Nov 2014 19:28:58 +0000 (14:28 -0500)
doc/TODO
htsn-import.cabal
schema/NFLTopPuntReturnXML.dtd [new file with mode: 0644]
schemagen/NFLTopPuntReturnXML/22118453.xml [new file with mode: 0644]
src/TSN/XML/SportInfo.hs
test/xml/sportinfo/NFLTopPuntReturnXML.dtd [new file with mode: 0644]
test/xml/sportinfo/NFLTopPuntReturnXML.xml [new file with mode: 0644]

index 6b0ee89c32cf1d596c7a4056d1e57b0933203e3c..8fdb22c3dbc820bc43904cd2197dbeb58d877475 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -13,7 +13,6 @@
    * Cbask_Team_Scoring_Rebound_Margin_XML.dtd
    * Cbask_Team_Scoring_XML.dtd
    * Cbask_Team_Shooting_Pct_XML.dtd
-   * NFLTopPuntReturnXML.dtd
    * NFLYardsXML.dtd
    * NFL_PuntingLeaders_XML.dtd
 
index 07d9ac1cb44e7796b17c3aa9cf00f4bcf6d4b770..d49ce3f6dba6cf2d2aa37f5a533dea2394302f2b 100644 (file)
@@ -163,6 +163,7 @@ extra-source-files:
   schemagen/NFL_Team_Stats_XML/*.xml
   schemagen/NFLTopKickoffReturnXML/*.xml
   schemagen/NFLTopPerformanceXML/*.xml
+  schemagen/NFLTopPuntReturnXML/*.xml
   schemagen/NFLTotalYardageXML/*.xml
   schemagen/nhlpreviewxml/*.xml
   schemagen/Odds_XML/*.xml
diff --git a/schema/NFLTopPuntReturnXML.dtd b/schema/NFLTopPuntReturnXML.dtd
new file mode 100644 (file)
index 0000000..2204bc3
--- /dev/null
@@ -0,0 +1,16 @@
+<!ELEMENT XML_File_ID (#PCDATA)>
+<!ELEMENT heading (#PCDATA)>
+<!ELEMENT category (#PCDATA)>
+<!ELEMENT sport (#PCDATA)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT rank (#PCDATA)>
+<!ELEMENT name (#PCDATA)>
+<!ELEMENT returns (#PCDATA)>
+<!ELEMENT yards (#PCDATA)>
+<!ELEMENT average (#PCDATA)>
+<!ELEMENT long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT fair_catches (#PCDATA)>
+<!ELEMENT listing ( ( rank, name, returns, yards, average, long, TD, fair_catches ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/schemagen/NFLTopPuntReturnXML/22118453.xml b/schemagen/NFLTopPuntReturnXML/22118453.xml
new file mode 100644 (file)
index 0000000..8f6d6f7
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLTopPuntReturnXML.dtd">\r<message>\r<XML_File_ID>22118453</XML_File_ID>\r<heading>ABX%NFC-PUNTRETURN-YARDS-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Punt Return Yards Leaders</title>\r<listing>\r<rank>1</rank>\r<name>Darren Sproles, PHI</name>\r<returns>20</returns>\r<yards>307</yards>\r<average>15.3</average>\r<long>82</long>\r<TD>1</TD>\r<fair_catches>8</fair_catches>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Jeremy Ross, DET</name>\r<returns>15</returns>\r<yards>172</yards>\r<average>11.5</average>\r<long>28</long>\r<TD>0</TD>\r<fair_catches>23</fair_catches>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Marcus Sherels, MIN</name>\r<returns>20</returns>\r<yards>169</yards>\r<average>8.4</average>\r<long>24</long>\r<TD>0</TD>\r<fair_catches>16</fair_catches>\r</listing>\r<listing>\r<rank></rank>\r<name>Ted Ginn, ARI</name>\r<returns>14</returns>\r<yards>169</yards>\r<average>12.1</average>\r<long>71</long>\r<TD>1</TD>\r<fair_catches>13</fair_catches>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Andre Roberts, WAS</name>\r<returns>17</returns>\r<yards>154</yards>\r<average>9.1</average>\r<long>37</long>\r<TD>0</TD>\r<fair_catches>19</fair_catches>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Devin Hester, ATL</name>\r<returns>12</returns>\r<yards>151</yards>\r<average>12.6</average>\r<long>62</long>\r<TD>1</TD>\r<fair_catches>4</fair_catches>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Dwayne Harris, DAL</name>\r<returns>16</returns>\r<yards>142</yards>\r<average>8.9</average>\r<long>38</long>\r<TD>0</TD>\r<fair_catches>9</fair_catches>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Philly Brown, CAR</name>\r<returns>12</returns>\r<yards>137</yards>\r<average>11.4</average>\r<long>79</long>\r<TD>1</TD>\r<fair_catches>5</fair_catches>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Bruce Ellington, SFX</name>\r<returns>15</returns>\r<yards>119</yards>\r<average>7.9</average>\r<long>21</long>\r<TD>0</TD>\r<fair_catches>9</fair_catches>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Solomon Patton, TAM</name>\r<returns>10</returns>\r<yards>112</yards>\r<average>11.2</average>\r<long>33</long>\r<TD>0</TD>\r<fair_catches>4</fair_catches>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Tavon Austin, STL</name>\r<returns>16</returns>\r<yards>109</yards>\r<average>6.8</average>\r<long>38</long>\r<TD>0</TD>\r<fair_catches>6</fair_catches>\r</listing>\r<listing>\r<rank></rank>\r<name>Bryan Walters, SEA</name>\r<returns>12</returns>\r<yards>109</yards>\r<average>9.1</average>\r<long>21</long>\r<TD>0</TD>\r<fair_catches>8</fair_catches>\r</listing>\r<listing>\r<rank>13</rank>\r<name>Stedman Bailey, STL</name>\r<returns>1</returns>\r<yards>90</yards>\r<average>90.0</average>\r<long>90</long>\r<TD>1</TD>\r<fair_catches>0</fair_catches>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Randall Cobb, GBP</name>\r<returns>8</returns>\r<yards>86</yards>\r<average>10.8</average>\r<long>24</long>\r<TD>0</TD>\r<fair_catches>4</fair_catches>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Preston Parker, NYG</name>\r<returns>8</returns>\r<yards>53</yards>\r<average>6.6</average>\r<long>18</long>\r<TD>0</TD>\r<fair_catches>6</fair_catches>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Santonio Holmes, CHI</name>\r<returns>8</returns>\r<yards>50</yards>\r<average>6.3</average>\r<long>22</long>\r<TD>0</TD>\r<fair_catches>5</fair_catches>\r</listing>\r<time_stamp> November 4, 2014, at 06:12 AM ET </time_stamp>\r</message>\r
\ No newline at end of file
index ffa8f6478ebb6f95195b9191ac46589f2fc53b59..76a7c94a4910b261e740eb1135b16fb839fb5af0 100644 (file)
@@ -178,6 +178,7 @@ dtds =
     "NFLTeamRankingsXML.dtd",
     "NFLTopKickoffReturnXML.dtd",
     "NFLTopPerformanceXML.dtd",
+    "NFLTopPuntReturnXML.dtd",
     "NFLTotalYardageXML.dtd",
     "NFL_KickingLeaders_XML.dtd",
     "NFL_NBA_Draft_XML.dtd",
diff --git a/test/xml/sportinfo/NFLTopPuntReturnXML.dtd b/test/xml/sportinfo/NFLTopPuntReturnXML.dtd
new file mode 100644 (file)
index 0000000..2204bc3
--- /dev/null
@@ -0,0 +1,16 @@
+<!ELEMENT XML_File_ID (#PCDATA)>
+<!ELEMENT heading (#PCDATA)>
+<!ELEMENT category (#PCDATA)>
+<!ELEMENT sport (#PCDATA)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT rank (#PCDATA)>
+<!ELEMENT name (#PCDATA)>
+<!ELEMENT returns (#PCDATA)>
+<!ELEMENT yards (#PCDATA)>
+<!ELEMENT average (#PCDATA)>
+<!ELEMENT long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT fair_catches (#PCDATA)>
+<!ELEMENT listing ( ( rank, name, returns, yards, average, long, TD, fair_catches ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/test/xml/sportinfo/NFLTopPuntReturnXML.xml b/test/xml/sportinfo/NFLTopPuntReturnXML.xml
new file mode 100644 (file)
index 0000000..8f6d6f7
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLTopPuntReturnXML.dtd">\r<message>\r<XML_File_ID>22118453</XML_File_ID>\r<heading>ABX%NFC-PUNTRETURN-YARDS-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Punt Return Yards Leaders</title>\r<listing>\r<rank>1</rank>\r<name>Darren Sproles, PHI</name>\r<returns>20</returns>\r<yards>307</yards>\r<average>15.3</average>\r<long>82</long>\r<TD>1</TD>\r<fair_catches>8</fair_catches>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Jeremy Ross, DET</name>\r<returns>15</returns>\r<yards>172</yards>\r<average>11.5</average>\r<long>28</long>\r<TD>0</TD>\r<fair_catches>23</fair_catches>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Marcus Sherels, MIN</name>\r<returns>20</returns>\r<yards>169</yards>\r<average>8.4</average>\r<long>24</long>\r<TD>0</TD>\r<fair_catches>16</fair_catches>\r</listing>\r<listing>\r<rank></rank>\r<name>Ted Ginn, ARI</name>\r<returns>14</returns>\r<yards>169</yards>\r<average>12.1</average>\r<long>71</long>\r<TD>1</TD>\r<fair_catches>13</fair_catches>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Andre Roberts, WAS</name>\r<returns>17</returns>\r<yards>154</yards>\r<average>9.1</average>\r<long>37</long>\r<TD>0</TD>\r<fair_catches>19</fair_catches>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Devin Hester, ATL</name>\r<returns>12</returns>\r<yards>151</yards>\r<average>12.6</average>\r<long>62</long>\r<TD>1</TD>\r<fair_catches>4</fair_catches>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Dwayne Harris, DAL</name>\r<returns>16</returns>\r<yards>142</yards>\r<average>8.9</average>\r<long>38</long>\r<TD>0</TD>\r<fair_catches>9</fair_catches>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Philly Brown, CAR</name>\r<returns>12</returns>\r<yards>137</yards>\r<average>11.4</average>\r<long>79</long>\r<TD>1</TD>\r<fair_catches>5</fair_catches>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Bruce Ellington, SFX</name>\r<returns>15</returns>\r<yards>119</yards>\r<average>7.9</average>\r<long>21</long>\r<TD>0</TD>\r<fair_catches>9</fair_catches>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Solomon Patton, TAM</name>\r<returns>10</returns>\r<yards>112</yards>\r<average>11.2</average>\r<long>33</long>\r<TD>0</TD>\r<fair_catches>4</fair_catches>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Tavon Austin, STL</name>\r<returns>16</returns>\r<yards>109</yards>\r<average>6.8</average>\r<long>38</long>\r<TD>0</TD>\r<fair_catches>6</fair_catches>\r</listing>\r<listing>\r<rank></rank>\r<name>Bryan Walters, SEA</name>\r<returns>12</returns>\r<yards>109</yards>\r<average>9.1</average>\r<long>21</long>\r<TD>0</TD>\r<fair_catches>8</fair_catches>\r</listing>\r<listing>\r<rank>13</rank>\r<name>Stedman Bailey, STL</name>\r<returns>1</returns>\r<yards>90</yards>\r<average>90.0</average>\r<long>90</long>\r<TD>1</TD>\r<fair_catches>0</fair_catches>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Randall Cobb, GBP</name>\r<returns>8</returns>\r<yards>86</yards>\r<average>10.8</average>\r<long>24</long>\r<TD>0</TD>\r<fair_catches>4</fair_catches>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Preston Parker, NYG</name>\r<returns>8</returns>\r<yards>53</yards>\r<average>6.6</average>\r<long>18</long>\r<TD>0</TD>\r<fair_catches>6</fair_catches>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Santonio Holmes, CHI</name>\r<returns>8</returns>\r<yards>50</yards>\r<average>6.3</average>\r<long>22</long>\r<TD>0</TD>\r<fair_catches>5</fair_catches>\r</listing>\r<time_stamp> November 4, 2014, at 06:12 AM ET </time_stamp>\r</message>\r
\ No newline at end of file