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

index 47e00ca085f006452b22fb81a77c7d1e73818479..902c655440ebcb2217427cec57c06c16a0326f58 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
-   * NFLRushingLeadersXML.dtd
    * NFLTackleFFLeadersXML.dtd
    * NFLTopKickoffReturnXML.dtd
    * NFLTopPuntReturnXML.dtd
index 6d22cab1576adf5f7c5773b92dfbe8bc95f06085..09ee09903e0993617c8d7a925f246af3098ccad8 100644 (file)
@@ -155,6 +155,7 @@ extra-source-files:
   schemagen/NFLQBStartsXML/*.xml
   schemagen/NFLReceivingLeadersXML/*.xml
   schemagen/NFL_Roster_XML/*.xml
+  schemagen/NFLRushingLeadersXML/*.xml
   schemagen/NFLSackLeadersXML/*.xml
   schemagen/nflstandxml/*.xml
   schemagen/NFLTeamRankingsXML/*.xml
diff --git a/schema/NFLRushingLeadersXML.dtd b/schema/NFLRushingLeadersXML.dtd
new file mode 100644 (file)
index 0000000..006f59f
--- /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 attempts (#PCDATA)>
+<!ELEMENT yards (#PCDATA)>
+<!ELEMENT average (#PCDATA)>
+<!ELEMENT long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT listing ( ( rank, name, attempts, yards, average, long, TD ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/schemagen/NFLRushingLeadersXML/21901204.xml b/schemagen/NFLRushingLeadersXML/21901204.xml
new file mode 100644 (file)
index 0000000..9c9a935
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLRushingLeadersXML.dtd">\r<message>\r<XML_File_ID>21901204</XML_File_ID>\r<heading>ABX%AFC-RUSHINGAVERAGE-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 AFC Rushing Average Leaders</title>\r<listing>\r<rank>1</rank>\r<name>Justin Forsett, BAL</name>\r<attempts>44</attempts>\r<yards>255</yards>\r<average>5.8</average>\r<long>41</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Lamar Miller, MIA</name>\r<attempts>49</attempts>\r<yards>277</yards>\r<average>5.7</average>\r<long>24</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Knowshon Moreno, MIA</name>\r<attempts>25</attempts>\r<yards>138</yards>\r<average>5.5</average>\r<long>15</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>4</rank>\r<name>Chris Ivory, NYJ</name>\r<attempts>50</attempts>\r<yards>274</yards>\r<average>5.5</average>\r<long>71</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Ahmad Bradshaw, IND</name>\r<attempts>34</attempts>\r<yards>182</yards>\r<average>5.4</average>\r<long>29</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Le'Veon Bell, PIT</name>\r<attempts>72</attempts>\r<yards>378</yards>\r<average>5.3</average>\r<long>81</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Isaiah Crowell, CLE</name>\r<attempts>27</attempts>\r<yards>141</yards>\r<average>5.2</average>\r<long>22</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Jeremy Hill, CIN</name>\r<attempts>26</attempts>\r<yards>132</yards>\r<average>5.1</average>\r<long>13</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Fred Jackson, BUF</name>\r<attempts>32</attempts>\r<yards>152</yards>\r<average>4.8</average>\r<long>38</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Shonn Greene, TEN</name>\r<attempts>33</attempts>\r<yards>154</yards>\r<average>4.7</average>\r<long>20</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Knile Davis, KAN</name>\r<attempts>71</attempts>\r<yards>321</yards>\r<average>4.5</average>\r<long>48</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>12</rank>\r<name>Lorenzo Taliaferro, BAL</name>\r<attempts>33</attempts>\r<yards>149</yards>\r<average>4.5</average>\r<long>31</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>13</rank>\r<name>Shane Vereen, NEP</name>\r<attempts>28</attempts>\r<yards>122</yards>\r<average>4.4</average>\r<long>12</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Terrance West, CLE</name>\r<attempts>47</attempts>\r<yards>204</yards>\r<average>4.3</average>\r<long>29</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Jamaal Charles, KAN</name>\r<attempts>27</attempts>\r<yards>115</yards>\r<average>4.3</average>\r<long>17</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Chris Johnson, NYJ</name>\r<attempts>41</attempts>\r<yards>167</yards>\r<average>4.1</average>\r<long>35</long>\r<TD>1</TD>\r</listing>\r<time_stamp> September 30, 2014, at 02:28 AM ET </time_stamp>\r</message>\r
\ No newline at end of file
index 9f454d9c473139147e71ac552ca508138832e03c..d75f9cd36417d49bf57183b170191149fed2747f 100644 (file)
@@ -172,6 +172,7 @@ dtds =
     "NFLPassLeadXML.dtd",
     "NFLQBStartsXML.dtd",
     "NFLReceivingLeadersXML.dtd",
+    "NFLRushingLeadersXML.dtd",
     "NFLSackLeadersXML.dtd",
     "nflstandxml.dtd",
     "NFLTeamRankingsXML.dtd",
diff --git a/test/xml/sportinfo/NFLRushingLeadersXML.dtd b/test/xml/sportinfo/NFLRushingLeadersXML.dtd
new file mode 100644 (file)
index 0000000..006f59f
--- /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 attempts (#PCDATA)>
+<!ELEMENT yards (#PCDATA)>
+<!ELEMENT average (#PCDATA)>
+<!ELEMENT long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT listing ( ( rank, name, attempts, 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/NFLRushingLeadersXML.xml b/test/xml/sportinfo/NFLRushingLeadersXML.xml
new file mode 100644 (file)
index 0000000..9c9a935
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLRushingLeadersXML.dtd">\r<message>\r<XML_File_ID>21901204</XML_File_ID>\r<heading>ABX%AFC-RUSHINGAVERAGE-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 AFC Rushing Average Leaders</title>\r<listing>\r<rank>1</rank>\r<name>Justin Forsett, BAL</name>\r<attempts>44</attempts>\r<yards>255</yards>\r<average>5.8</average>\r<long>41</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Lamar Miller, MIA</name>\r<attempts>49</attempts>\r<yards>277</yards>\r<average>5.7</average>\r<long>24</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Knowshon Moreno, MIA</name>\r<attempts>25</attempts>\r<yards>138</yards>\r<average>5.5</average>\r<long>15</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>4</rank>\r<name>Chris Ivory, NYJ</name>\r<attempts>50</attempts>\r<yards>274</yards>\r<average>5.5</average>\r<long>71</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Ahmad Bradshaw, IND</name>\r<attempts>34</attempts>\r<yards>182</yards>\r<average>5.4</average>\r<long>29</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Le'Veon Bell, PIT</name>\r<attempts>72</attempts>\r<yards>378</yards>\r<average>5.3</average>\r<long>81</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Isaiah Crowell, CLE</name>\r<attempts>27</attempts>\r<yards>141</yards>\r<average>5.2</average>\r<long>22</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Jeremy Hill, CIN</name>\r<attempts>26</attempts>\r<yards>132</yards>\r<average>5.1</average>\r<long>13</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Fred Jackson, BUF</name>\r<attempts>32</attempts>\r<yards>152</yards>\r<average>4.8</average>\r<long>38</long>\r<TD>0</TD>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Shonn Greene, TEN</name>\r<attempts>33</attempts>\r<yards>154</yards>\r<average>4.7</average>\r<long>20</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Knile Davis, KAN</name>\r<attempts>71</attempts>\r<yards>321</yards>\r<average>4.5</average>\r<long>48</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>12</rank>\r<name>Lorenzo Taliaferro, BAL</name>\r<attempts>33</attempts>\r<yards>149</yards>\r<average>4.5</average>\r<long>31</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>13</rank>\r<name>Shane Vereen, NEP</name>\r<attempts>28</attempts>\r<yards>122</yards>\r<average>4.4</average>\r<long>12</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Terrance West, CLE</name>\r<attempts>47</attempts>\r<yards>204</yards>\r<average>4.3</average>\r<long>29</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Jamaal Charles, KAN</name>\r<attempts>27</attempts>\r<yards>115</yards>\r<average>4.3</average>\r<long>17</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Chris Johnson, NYJ</name>\r<attempts>41</attempts>\r<yards>167</yards>\r<average>4.1</average>\r<long>35</long>\r<TD>1</TD>\r</listing>\r<time_stamp> September 30, 2014, at 02:28 AM ET </time_stamp>\r</message>\r
\ No newline at end of file