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

index f3d7a656c841bd5b792906177bf15686e6abca59..47e00ca085f006452b22fb81a77c7d1e73818479 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
-   * NFLReceivingLeadersXML.dtd
    * NFLRushingLeadersXML.dtd
    * NFLTackleFFLeadersXML.dtd
    * NFLTopKickoffReturnXML.dtd
index 81c1a8363b44778084012be2abf0c2d0aa8edd66..6d22cab1576adf5f7c5773b92dfbe8bc95f06085 100644 (file)
@@ -153,6 +153,7 @@ extra-source-files:
   schemagen/NFLPassLeadXML/*.xml
   schemagen/nflpreviewxml/*.xml
   schemagen/NFLQBStartsXML/*.xml
+  schemagen/NFLReceivingLeadersXML/*.xml
   schemagen/NFL_Roster_XML/*.xml
   schemagen/NFLSackLeadersXML/*.xml
   schemagen/nflstandxml/*.xml
diff --git a/schema/NFLReceivingLeadersXML.dtd b/schema/NFLReceivingLeadersXML.dtd
new file mode 100644 (file)
index 0000000..ce6123c
--- /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 receptions (#PCDATA)>
+<!ELEMENT yards (#PCDATA)>
+<!ELEMENT average (#PCDATA)>
+<!ELEMENT long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT listing ( ( rank, name, receptions, yards, average, long, TD ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/schemagen/NFLReceivingLeadersXML/22113940.xml b/schemagen/NFLReceivingLeadersXML/22113940.xml
new file mode 100644 (file)
index 0000000..8f1aaec
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLReceivingLeadersXML.dtd">\r<message>\r<XML_File_ID>22113940</XML_File_ID>\r<heading>ABX%NFC-RECEIVINGAVERAGE-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Average Yards Per Reception Leaders</title>\r<listing>\r<rank>1</rank>\r<name>DeSean Jackson, WAS</name>\r<receptions>36</receptions>\r<yards>784</yards>\r<average>21.8</average>\r<long>81</long>\r<TD>4</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Jeremy Maclin, PHI</name>\r<receptions>45</receptions>\r<yards>790</yards>\r<average>17.6</average>\r<long>68</long>\r<TD>8</TD>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Michael Floyd, ARI</name>\r<receptions>23</receptions>\r<yards>389</yards>\r<average>16.9</average>\r<long>63</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>4</rank>\r<name>Marques Colston, NOS</name>\r<receptions>28</receptions>\r<yards>444</yards>\r<average>15.9</average>\r<long>57</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Calvin Johnson, DET</name>\r<receptions>22</receptions>\r<yards>348</yards>\r<average>15.8</average>\r<long>67</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Terrance Williams, DAL</name>\r<receptions>27</receptions>\r<yards>426</yards>\r<average>15.8</average>\r<long>47</long>\r<TD>6</TD>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Kenny Britt, STL</name>\r<receptions>18</receptions>\r<yards>281</yards>\r<average>15.6</average>\r<long>43</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Kenny Stills, NOS</name>\r<receptions>24</receptions>\r<yards>373</yards>\r<average>15.5</average>\r<long>46</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Brian Quick, STL</name>\r<receptions>25</receptions>\r<yards>375</yards>\r<average>15.0</average>\r<long>51</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Alshon Jeffery, CHI</name>\r<receptions>38</receptions>\r<yards>563</yards>\r<average>14.8</average>\r<long>74</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Jordy Nelson, GBP</name>\r<receptions>50</receptions>\r<yards>737</yards>\r<average>14.7</average>\r<long>80</long>\r<TD>6</TD>\r</listing>\r<listing>\r<rank>12</rank>\r<name>Kelvin Benjamin, CAR</name>\r<receptions>40</receptions>\r<yards>589</yards>\r<average>14.7</average>\r<long>51</long>\r<TD>5</TD>\r</listing>\r<listing>\r<rank>13</rank>\r<name>Larry Fitzgerald, ARI</name>\r<receptions>35</receptions>\r<yards>513</yards>\r<average>14.7</average>\r<long>80</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Victor Cruz, NYG</name>\r<receptions>23</receptions>\r<yards>337</yards>\r<average>14.7</average>\r<long>61</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Devin Hester, ATL</name>\r<receptions>18</receptions>\r<yards>263</yards>\r<average>14.6</average>\r<long>36</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Golden Tate, DET</name>\r<receptions>55</receptions>\r<yards>800</yards>\r<average>14.5</average>\r<long>73</long>\r<TD>3</TD>\r</listing>\r<time_stamp> November 3, 2014, at 03:14 AM ET </time_stamp>\r</message>\r
\ No newline at end of file
index 4b885d0d8b8adc8aec4e8d0bebb562d0f888f48f..9f454d9c473139147e71ac552ca508138832e03c 100644 (file)
@@ -171,6 +171,7 @@ dtds =
     "NFLPassingLeadersXML.dtd",
     "NFLPassLeadXML.dtd",
     "NFLQBStartsXML.dtd",
+    "NFLReceivingLeadersXML.dtd",
     "NFLSackLeadersXML.dtd",
     "nflstandxml.dtd",
     "NFLTeamRankingsXML.dtd",
diff --git a/test/xml/sportinfo/NFLReceivingLeadersXML.dtd b/test/xml/sportinfo/NFLReceivingLeadersXML.dtd
new file mode 100644 (file)
index 0000000..ce6123c
--- /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 receptions (#PCDATA)>
+<!ELEMENT yards (#PCDATA)>
+<!ELEMENT average (#PCDATA)>
+<!ELEMENT long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT listing ( ( rank, name, receptions, 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/NFLReceivingLeadersXML.xml b/test/xml/sportinfo/NFLReceivingLeadersXML.xml
new file mode 100644 (file)
index 0000000..8f1aaec
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLReceivingLeadersXML.dtd">\r<message>\r<XML_File_ID>22113940</XML_File_ID>\r<heading>ABX%NFC-RECEIVINGAVERAGE-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Average Yards Per Reception Leaders</title>\r<listing>\r<rank>1</rank>\r<name>DeSean Jackson, WAS</name>\r<receptions>36</receptions>\r<yards>784</yards>\r<average>21.8</average>\r<long>81</long>\r<TD>4</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<name>Jeremy Maclin, PHI</name>\r<receptions>45</receptions>\r<yards>790</yards>\r<average>17.6</average>\r<long>68</long>\r<TD>8</TD>\r</listing>\r<listing>\r<rank>3</rank>\r<name>Michael Floyd, ARI</name>\r<receptions>23</receptions>\r<yards>389</yards>\r<average>16.9</average>\r<long>63</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>4</rank>\r<name>Marques Colston, NOS</name>\r<receptions>28</receptions>\r<yards>444</yards>\r<average>15.9</average>\r<long>57</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>5</rank>\r<name>Calvin Johnson, DET</name>\r<receptions>22</receptions>\r<yards>348</yards>\r<average>15.8</average>\r<long>67</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>6</rank>\r<name>Terrance Williams, DAL</name>\r<receptions>27</receptions>\r<yards>426</yards>\r<average>15.8</average>\r<long>47</long>\r<TD>6</TD>\r</listing>\r<listing>\r<rank>7</rank>\r<name>Kenny Britt, STL</name>\r<receptions>18</receptions>\r<yards>281</yards>\r<average>15.6</average>\r<long>43</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>8</rank>\r<name>Kenny Stills, NOS</name>\r<receptions>24</receptions>\r<yards>373</yards>\r<average>15.5</average>\r<long>46</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>9</rank>\r<name>Brian Quick, STL</name>\r<receptions>25</receptions>\r<yards>375</yards>\r<average>15.0</average>\r<long>51</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>10</rank>\r<name>Alshon Jeffery, CHI</name>\r<receptions>38</receptions>\r<yards>563</yards>\r<average>14.8</average>\r<long>74</long>\r<TD>3</TD>\r</listing>\r<listing>\r<rank>11</rank>\r<name>Jordy Nelson, GBP</name>\r<receptions>50</receptions>\r<yards>737</yards>\r<average>14.7</average>\r<long>80</long>\r<TD>6</TD>\r</listing>\r<listing>\r<rank>12</rank>\r<name>Kelvin Benjamin, CAR</name>\r<receptions>40</receptions>\r<yards>589</yards>\r<average>14.7</average>\r<long>51</long>\r<TD>5</TD>\r</listing>\r<listing>\r<rank>13</rank>\r<name>Larry Fitzgerald, ARI</name>\r<receptions>35</receptions>\r<yards>513</yards>\r<average>14.7</average>\r<long>80</long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>14</rank>\r<name>Victor Cruz, NYG</name>\r<receptions>23</receptions>\r<yards>337</yards>\r<average>14.7</average>\r<long>61</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>15</rank>\r<name>Devin Hester, ATL</name>\r<receptions>18</receptions>\r<yards>263</yards>\r<average>14.6</average>\r<long>36</long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank>16</rank>\r<name>Golden Tate, DET</name>\r<receptions>55</receptions>\r<yards>800</yards>\r<average>14.5</average>\r<long>73</long>\r<TD>3</TD>\r</listing>\r<time_stamp> November 3, 2014, at 03:14 AM ET </time_stamp>\r</message>\r
\ No newline at end of file