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

index 817367d29643e1a0d398de19077d24a74f5e2c90..5d61274942d352e8fc7aa599939a8b853b16fcf5 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
-   * NFLInterceptionLeadersXML.dtd
    * NFLPassingLeadersXML.dtd
    * NFLReceivingLeadersXML.dtd
    * NFLRushingLeadersXML.dtd
index 07d13a3dd3fb60cbb080edfdd8fbdaccfbab1a59..192676ac3513b58a9f857e1b27b0c45f559ab5ca 100644 (file)
@@ -143,6 +143,7 @@ extra-source-files:
   schemagen/NFLGiveTakeXML/*.xml
   schemagen/NFLGrassTurfDomeOutsideXML/*.xml
   schemagen/NFLInside20XML/*.xml
+  schemagen/NFLInterceptionLeadersXML/*.xml
   schemagen/NFL_KickingLeaders_XML/*.xml
   schemagen/NFLKickoffsXML/*.xml
   schemagen/NFLMondayNightXML/*.xml
diff --git a/schema/NFLInterceptionLeadersXML.dtd b/schema/NFLInterceptionLeadersXML.dtd
new file mode 100644 (file)
index 0000000..ed0a783
--- /dev/null
@@ -0,0 +1,14 @@
+<!ELEMENT XML_File_ID (#PCDATA)>
+<!ELEMENT heading (#PCDATA)>
+<!ELEMENT category (#PCDATA)>
+<!ELEMENT sport (#PCDATA)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT rank (#PCDATA)>
+<!ELEMENT Player_Team (#PCDATA)>
+<!ELEMENT Int (#PCDATA)>
+<!ELEMENT Yards (#PCDATA)>
+<!ELEMENT Long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT listing ( ( rank, Player_Team, Int, Yards, Long, TD ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/schemagen/NFLInterceptionLeadersXML/22118486.xml b/schemagen/NFLInterceptionLeadersXML/22118486.xml
new file mode 100644 (file)
index 0000000..5c774a0
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLInterceptionLeadersXML.dtd">\r<message>\r<XML_File_ID>22118486</XML_File_ID>\r<heading>ABX%NFC-INTERCEPTIONS-TD-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Interceptions for TD Leaders</title>\r<listing>\r<rank>1</rank>\r<Player_Team>Danny Lansanah, TAM</Player_Team>\r<Int>2</Int>\r<Yards>60</Yards>\r<Long>33</Long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<Player_Team>Harrison Smith, MIN</Player_Team>\r<Int>3</Int>\r<Yards>87</Yards>\r<Long>81</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Malcolm Jenkins, PHI</Player_Team>\r<Int>3</Int>\r<Yards>67</Yards>\r<Long>53</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Rashad Johnson, ARI</Player_Team>\r<Int>2</Int>\r<Yards>58</Yards>\r<Long>30</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Tyler Patmon, DAL</Player_Team>\r<Int>1</Int>\r<Yards>58</Yards>\r<Long>58</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Julius Peppers, GBP</Player_Team>\r<Int>1</Int>\r<Yards>49</Yards>\r<Long>49</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Ryan Mundy, CHI</Player_Team>\r<Int>1</Int>\r<Yards>45</Yards>\r<Long>45</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Rashean Mathis, DET</Player_Team>\r<Int>1</Int>\r<Yards>41</Yards>\r<Long>41</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Bruce Irvin, SEA</Player_Team>\r<Int>1</Int>\r<Yards>35</Yards>\r<Long>35</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Bruce Carter, DAL</Player_Team>\r<Int>1</Int>\r<Yards>25</Yards>\r<Long>25</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Janoris Jenkins, STL</Player_Team>\r<Int>1</Int>\r<Yards>25</Yards>\r<Long>25</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Kemal Ishmael, ATL</Player_Team>\r<Int>1</Int>\r<Yards>23</Yards>\r<Long>23</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Dontae Johnson, SFX</Player_Team>\r<Int>1</Int>\r<Yards>20</Yards>\r<Long>20</Long>\r<TD>1</TD>\r</listing>\r<time_stamp> November 4, 2014, at 06:17 AM ET </time_stamp>\r</message>\r
\ No newline at end of file
index 182dd1788aa8757439d3cf264c52c8873c34765b..791155b2151b0c5f84ae2303a7f33272307ab768 100644 (file)
@@ -165,6 +165,7 @@ dtds =
     "NFLGrassTurfDomeOutsideXML.dtd",
     "NFLGiveTakeXML.dtd",
     "NFLInside20XML.dtd",
+    "NFLInterceptionLeadersXML.dtd",
     "NFLKickoffsXML.dtd",
     "NFLMondayNightXML.dtd",
     "NFLPassLeadXML.dtd",
diff --git a/test/xml/sportinfo/NFLInterceptionLeadersXML.dtd b/test/xml/sportinfo/NFLInterceptionLeadersXML.dtd
new file mode 100644 (file)
index 0000000..ed0a783
--- /dev/null
@@ -0,0 +1,14 @@
+<!ELEMENT XML_File_ID (#PCDATA)>
+<!ELEMENT heading (#PCDATA)>
+<!ELEMENT category (#PCDATA)>
+<!ELEMENT sport (#PCDATA)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT rank (#PCDATA)>
+<!ELEMENT Player_Team (#PCDATA)>
+<!ELEMENT Int (#PCDATA)>
+<!ELEMENT Yards (#PCDATA)>
+<!ELEMENT Long (#PCDATA)>
+<!ELEMENT TD (#PCDATA)>
+<!ELEMENT listing ( ( rank, Player_Team, Int, Yards, Long, TD ) )>
+<!ELEMENT time_stamp (#PCDATA)>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, listing*, time_stamp ) )>
diff --git a/test/xml/sportinfo/NFLInterceptionLeadersXML.xml b/test/xml/sportinfo/NFLInterceptionLeadersXML.xml
new file mode 100644 (file)
index 0000000..5c774a0
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "NFLInterceptionLeadersXML.dtd">\r<message>\r<XML_File_ID>22118486</XML_File_ID>\r<heading>ABX%NFC-INTERCEPTIONS-TD-LEADERS</heading>\r<category>Statistics</category>\r<sport>NFL</sport>\r<title>2014 NFC Interceptions for TD Leaders</title>\r<listing>\r<rank>1</rank>\r<Player_Team>Danny Lansanah, TAM</Player_Team>\r<Int>2</Int>\r<Yards>60</Yards>\r<Long>33</Long>\r<TD>2</TD>\r</listing>\r<listing>\r<rank>2</rank>\r<Player_Team>Harrison Smith, MIN</Player_Team>\r<Int>3</Int>\r<Yards>87</Yards>\r<Long>81</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Malcolm Jenkins, PHI</Player_Team>\r<Int>3</Int>\r<Yards>67</Yards>\r<Long>53</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Rashad Johnson, ARI</Player_Team>\r<Int>2</Int>\r<Yards>58</Yards>\r<Long>30</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Tyler Patmon, DAL</Player_Team>\r<Int>1</Int>\r<Yards>58</Yards>\r<Long>58</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Julius Peppers, GBP</Player_Team>\r<Int>1</Int>\r<Yards>49</Yards>\r<Long>49</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Ryan Mundy, CHI</Player_Team>\r<Int>1</Int>\r<Yards>45</Yards>\r<Long>45</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Rashean Mathis, DET</Player_Team>\r<Int>1</Int>\r<Yards>41</Yards>\r<Long>41</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Bruce Irvin, SEA</Player_Team>\r<Int>1</Int>\r<Yards>35</Yards>\r<Long>35</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Bruce Carter, DAL</Player_Team>\r<Int>1</Int>\r<Yards>25</Yards>\r<Long>25</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Janoris Jenkins, STL</Player_Team>\r<Int>1</Int>\r<Yards>25</Yards>\r<Long>25</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Kemal Ishmael, ATL</Player_Team>\r<Int>1</Int>\r<Yards>23</Yards>\r<Long>23</Long>\r<TD>1</TD>\r</listing>\r<listing>\r<rank></rank>\r<Player_Team>Dontae Johnson, SFX</Player_Team>\r<Int>1</Int>\r<Yards>20</Yards>\r<Long>20</Long>\r<TD>1</TD>\r</listing>\r<time_stamp> November 4, 2014, at 06:17 AM ET </time_stamp>\r</message>\r
\ No newline at end of file