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

index 96e4d1b2df563033f0521a71c5dac21c91becefc..6b0ee89c32cf1d596c7a4056d1e57b0933203e3c 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
-   * NFLTopKickoffReturnXML.dtd
    * NFLTopPuntReturnXML.dtd
    * NFLYardsXML.dtd
    * NFL_PuntingLeaders_XML.dtd
index 7995b61e435a1552e71bddfd0fa0b0b91fa52603..07d9ac1cb44e7796b17c3aa9cf00f4bcf6d4b770 100644 (file)
@@ -161,6 +161,7 @@ extra-source-files:
   schemagen/NFLTackleFFLeadersXML/*.xml
   schemagen/NFLTeamRankingsXML/*.xml
   schemagen/NFL_Team_Stats_XML/*.xml
+  schemagen/NFLTopKickoffReturnXML/*.xml
   schemagen/NFLTopPerformanceXML/*.xml
   schemagen/NFLTotalYardageXML/*.xml
   schemagen/nhlpreviewxml/*.xml
diff --git a/schema/NFLTopKickoffReturnXML.dtd b/schema/NFLTopKickoffReturnXML.dtd
new file mode 100644 (file)
index 0000000..c67f358
--- /dev/null
@@ -0,0 +1,15 @@
+<!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 listing ( ( rank, name, returns, yards, average, long, TD ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/schemagen/NFLTopKickoffReturnXML/22118451.xml b/schemagen/NFLTopKickoffReturnXML/22118451.xml
new file mode 100644 (file)
index 0000000..5fb0c46
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLTopKickoffReturnXML.dtd">\r<message>\r<XML_File_ID>22118451</XML_File_ID>\r<heading>ABX%NFC-KICKRETYARDS-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Kickoff Return Yards Leaders</title>\r<listing>\r<rank>1</rank>\r<name>Cordarrelle Patterson, MIN</name>\r<returns>22</returns>\r<yards>540</yards>\r<average>24.5</average>\r<long>49</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Devin Hester, ATL</name>\r<returns>19</returns>\r<yards>433</yards>\r<average>22.8</average>\r<long>36</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Benny Cunningham, STL</name>\r<returns>14</returns>\r<yards>419</yards>\r<average>29.9</average>\r<long>75</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>4</rank>\r<name>Dwayne Harris, DAL</name>\r<returns>16</returns>\r<yards>406</yards>\r<average>25.4</average>\r<long>33</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Solomon Patton, ARI</name>\r<returns>17</returns>\r<yards>393</yards>\r<average>23.1</average>\r<long>28</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Bruce Ellington, SFX</name>\r<returns>13</returns>\r<yards>342</yards>\r<average>26.3</average>\r<long>38</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Percy Harvin, NYJ</name>\r<returns>12</returns>\r<yards>283</yards>\r<average>23.6</average>\r<long>46</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Philly Brown, CAR</name>\r<returns>12</returns>\r<yards>273</yards>\r<average>22.8</average>\r<long>35</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Andre Roberts, WAS</name>\r<returns>11</returns>\r<yards>258</yards>\r<average>23.5</average>\r<long>45</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Chris Williams, CHI</name>\r<returns>11</returns>\r<yards>249</yards>\r<average>22.6</average>\r<long>50</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Quintin Demps, NYG</name>\r<returns>11</returns>\r<yards>234</yards>\r<average>21.3</average>\r<long>29</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>12</rank>\r<name>Michael Cox, NYG</name>\r<returns>9</returns>\r<yards>228</yards>\r<average>25.3</average>\r<long>40</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>13</rank>\r<name>DuJuan Harris, GBP</name>\r<returns>9</returns>\r<yards>211</yards>\r<average>23.4</average>\r<long>41</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Chris Polk, PHI</name>\r<returns>5</returns>\r<yards>202</yards>\r<average>40.4</average>\r<long>102</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Jeremy Ross, DET</name>\r<returns>7</returns>\r<yards>171</yards>\r<average>24.4</average>\r<long>34</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Travaris Cadet, NOS</name>\r<returns>6</returns>\r<yards>145</yards>\r<average>24.2</average>\r<long>34</long>\r<TD>0</TD>\r</listing>\r<time_stamp> November 4, 2014, at 06:11 AM ET </time_stamp>\r</message>\r
\ No newline at end of file
index a4fe93e16e590f9491f04754eb0b1a89adb38f84..ffa8f6478ebb6f95195b9191ac46589f2fc53b59 100644 (file)
@@ -176,6 +176,7 @@ dtds =
     "NFLSackLeadersXML.dtd",
     "nflstandxml.dtd",
     "NFLTeamRankingsXML.dtd",
+    "NFLTopKickoffReturnXML.dtd",
     "NFLTopPerformanceXML.dtd",
     "NFLTotalYardageXML.dtd",
     "NFL_KickingLeaders_XML.dtd",
diff --git a/test/xml/sportinfo/NFLTopKickoffReturnXML.dtd b/test/xml/sportinfo/NFLTopKickoffReturnXML.dtd
new file mode 100644 (file)
index 0000000..c67f358
--- /dev/null
@@ -0,0 +1,15 @@
+<!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 listing ( ( rank, name, returns, yards, average, long, TD ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/test/xml/sportinfo/NFLTopKickoffReturnXML.xml b/test/xml/sportinfo/NFLTopKickoffReturnXML.xml
new file mode 100644 (file)
index 0000000..5fb0c46
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLTopKickoffReturnXML.dtd">\r<message>\r<XML_File_ID>22118451</XML_File_ID>\r<heading>ABX%NFC-KICKRETYARDS-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Kickoff Return Yards Leaders</title>\r<listing>\r<rank>1</rank>\r<name>Cordarrelle Patterson, MIN</name>\r<returns>22</returns>\r<yards>540</yards>\r<average>24.5</average>\r<long>49</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Devin Hester, ATL</name>\r<returns>19</returns>\r<yards>433</yards>\r<average>22.8</average>\r<long>36</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Benny Cunningham, STL</name>\r<returns>14</returns>\r<yards>419</yards>\r<average>29.9</average>\r<long>75</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>4</rank>\r<name>Dwayne Harris, DAL</name>\r<returns>16</returns>\r<yards>406</yards>\r<average>25.4</average>\r<long>33</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Solomon Patton, ARI</name>\r<returns>17</returns>\r<yards>393</yards>\r<average>23.1</average>\r<long>28</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Bruce Ellington, SFX</name>\r<returns>13</returns>\r<yards>342</yards>\r<average>26.3</average>\r<long>38</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Percy Harvin, NYJ</name>\r<returns>12</returns>\r<yards>283</yards>\r<average>23.6</average>\r<long>46</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Philly Brown, CAR</name>\r<returns>12</returns>\r<yards>273</yards>\r<average>22.8</average>\r<long>35</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Andre Roberts, WAS</name>\r<returns>11</returns>\r<yards>258</yards>\r<average>23.5</average>\r<long>45</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Chris Williams, CHI</name>\r<returns>11</returns>\r<yards>249</yards>\r<average>22.6</average>\r<long>50</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Quintin Demps, NYG</name>\r<returns>11</returns>\r<yards>234</yards>\r<average>21.3</average>\r<long>29</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>12</rank>\r<name>Michael Cox, NYG</name>\r<returns>9</returns>\r<yards>228</yards>\r<average>25.3</average>\r<long>40</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>13</rank>\r<name>DuJuan Harris, GBP</name>\r<returns>9</returns>\r<yards>211</yards>\r<average>23.4</average>\r<long>41</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Chris Polk, PHI</name>\r<returns>5</returns>\r<yards>202</yards>\r<average>40.4</average>\r<long>102</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Jeremy Ross, DET</name>\r<returns>7</returns>\r<yards>171</yards>\r<average>24.4</average>\r<long>34</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Travaris Cadet, NOS</name>\r<returns>6</returns>\r<yards>145</yards>\r<average>24.2</average>\r<long>34</long>\r<TD>0</TD>\r</listing>\r<time_stamp> November 4, 2014, at 06:11 AM ET </time_stamp>\r</message>\r
\ No newline at end of file