Create the list of SportInfo test cases from the DTD list.
Remove one TODO and replace it with another about the missing SportInfo types.
5. Update the list of schemagen files in htsn-import.cabal.
-6. Derive the SportInfo test file paths from the DTD list when completed.
+6. We have DTDs but no sample XML for the following SportInfo types,
+ which have therefore been left unimplmented for now:
+
+ * Cbask_Indv_No_Avg_XML.dtd
+ * Cbask_Indv_Shooting_XML.dtd
+ * CBASK_StealsXML.dtd
+ * Cbask_Team_Scoring_Rebound_Margin_XML.dtd
+ * Cbask_Team_Scoring_XML.dtd
+ * Cbask_Team_Shooting_Pct_XML.dtd
+ * NFLGrassTurfDomeOutsideXML.dtd
+ * NFLInterceptionLeadersXML.dtd
+ * NFLPassingLeadersXML.dtd
+ * NFLReceivingLeadersXML.dtd
+ * NFLRushingLeadersXML.dtd
+ * NFLTackleFFLeadersXML.dtd
+ * NFLTopKickoffReturnXML.dtd
+ * NFLTopPuntReturnXML.dtd
+ * NFLYardsXML.dtd
+ * NFL_PuntingLeaders_XML.dtd
.IP \[bu]
Matchup_NBA_NHL_XML.dtd
.IP \[bu]
+MLB_Fielding_XML.dtd
+.IP \[bu]
MLB_Gaming_Matchup_XML.dtd
.IP \[bu]
MLB_Lineup_XML.dtd
--- /dev/null
+<!ELEMENT message (XML_File_ID, heading , category , sport , Title , Fielding_Stats+ , time_stamp )>\r
+\r
+<!ELEMENT XML_File_ID (#PCDATA )>\r
+\r
+<!ELEMENT heading (#PCDATA )>\r
+\r
+<!ELEMENT category (#PCDATA )>\r
+\r
+<!ELEMENT sport (#PCDATA )>\r
+\r
+<!ELEMENT Title (#PCDATA )>\r
+\r
+<!ELEMENT Fielding_Stats (Listing+ )>\r
+<!ATTLIST Fielding_Stats League CDATA #REQUIRED >\r
+<!ELEMENT Listing (Percentage , Games , Put_Outs , Assists , Errors , Total_Chances , Double_Plays , Tripple_Plays , Pass_Balls )>\r
+<!ATTLIST Listing Team CDATA #REQUIRED >\r
+<!ELEMENT Percentage (#PCDATA )>\r
+\r
+<!ELEMENT Games (#PCDATA )>\r
+\r
+<!ELEMENT Put_Outs (#PCDATA )>\r
+\r
+<!ELEMENT Assists (#PCDATA )>\r
+\r
+<!ELEMENT Errors (#PCDATA )>\r
+\r
+<!ELEMENT Total_Chances (#PCDATA )>\r
+\r
+<!ELEMENT Double_Plays (#PCDATA )>\r
+\r
+<!ELEMENT Tripple_Plays (#PCDATA )>\r
+\r
+<!ELEMENT Pass_Balls (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp (#PCDATA )>\r
+\r
--- /dev/null
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLB_Fielding_XML.dtd">\r
+<message>\r
+<XML_File_ID>82828217</XML_File_ID>\r
+<heading>AAX%TEAM-FIELDING</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<Title>2002 MLB Team Statistics - Fielding</Title>\r
+<Fielding_Stats League="American League">\r
+<Listing Team="Oakland">\r
+<Percentage>.986</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1875</Put_Outs>\r
+<Assists>767</Assists>\r
+<Errors>37</Errors>\r
+<Total_Chances>2679</Total_Chances>\r
+<Double_Plays>64</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Baltimore">\r
+<Percentage>.985</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1861</Put_Outs>\r
+<Assists>780</Assists>\r
+<Errors>40</Errors>\r
+<Total_Chances>2681</Total_Chances>\r
+<Double_Plays>78</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>11</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Minnesota">\r
+<Percentage>.985</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1920</Put_Outs>\r
+<Assists>660</Assists>\r
+<Errors>40</Errors>\r
+<Total_Chances>2620</Total_Chances>\r
+<Double_Plays>56</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>2</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Boston">\r
+<Percentage>.984</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1819</Put_Outs>\r
+<Assists>720</Assists>\r
+<Errors>40</Errors>\r
+<Total_Chances>2579</Total_Chances>\r
+<Double_Plays>61</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>9</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Anaheim">\r
+<Percentage>.984</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1832</Put_Outs>\r
+<Assists>666</Assists>\r
+<Errors>41</Errors>\r
+<Total_Chances>2539</Total_Chances>\r
+<Double_Plays>66</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Texas">\r
+<Percentage>.983</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1834</Put_Outs>\r
+<Assists>755</Assists>\r
+<Errors>45</Errors>\r
+<Total_Chances>2634</Total_Chances>\r
+<Double_Plays>69</Double_Plays>\r
+<Tripple_Plays>1</Tripple_Plays>\r
+<Pass_Balls>8</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Seattle">\r
+<Percentage>.982</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1871</Put_Outs>\r
+<Assists>709</Assists>\r
+<Errors>46</Errors>\r
+<Total_Chances>2626</Total_Chances>\r
+<Double_Plays>57</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Chicago">\r
+<Percentage>.982</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1869</Put_Outs>\r
+<Assists>730</Assists>\r
+<Errors>48</Errors>\r
+<Total_Chances>2647</Total_Chances>\r
+<Double_Plays>73</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Cleveland">\r
+<Percentage>.981</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1862</Put_Outs>\r
+<Assists>727</Assists>\r
+<Errors>50</Errors>\r
+<Total_Chances>2639</Total_Chances>\r
+<Double_Plays>73</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>7</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Tampa Bay">\r
+<Percentage>.981</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1854</Put_Outs>\r
+<Assists>673</Assists>\r
+<Errors>50</Errors>\r
+<Total_Chances>2577</Total_Chances>\r
+<Double_Plays>76</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Toronto">\r
+<Percentage>.980</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1830</Put_Outs>\r
+<Assists>691</Assists>\r
+<Errors>52</Errors>\r
+<Total_Chances>2573</Total_Chances>\r
+<Double_Plays>50</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Kansas City">\r
+<Percentage>.979</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1774</Put_Outs>\r
+<Assists>703</Assists>\r
+<Errors>53</Errors>\r
+<Total_Chances>2530</Total_Chances>\r
+<Double_Plays>65</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="New York">\r
+<Percentage>.979</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1910</Put_Outs>\r
+<Assists>661</Assists>\r
+<Errors>55</Errors>\r
+<Total_Chances>2626</Total_Chances>\r
+<Double_Plays>45</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Detroit">\r
+<Percentage>.978</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1815</Put_Outs>\r
+<Assists>748</Assists>\r
+<Errors>58</Errors>\r
+<Total_Chances>2621</Total_Chances>\r
+<Double_Plays>54</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>14</Pass_Balls>\r
+</Listing>\r
+</Fielding_Stats>\r
+<Fielding_Stats League="National League">\r
+<Listing Team="Arizona">\r
+<Percentage>.988</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1875</Put_Outs>\r
+<Assists>659</Assists>\r
+<Errors>32</Errors>\r
+<Total_Chances>2566</Total_Chances>\r
+<Double_Plays>51</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>8</Pass_Balls>\r
+</Listing>\r
+<Listing Team="San Francisco">\r
+<Percentage>.987</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1827</Put_Outs>\r
+<Assists>715</Assists>\r
+<Errors>33</Errors>\r
+<Total_Chances>2575</Total_Chances>\r
+<Double_Plays>90</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Houston">\r
+<Percentage>.986</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1862</Put_Outs>\r
+<Assists>685</Assists>\r
+<Errors>35</Errors>\r
+<Total_Chances>2582</Total_Chances>\r
+<Double_Plays>55</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Philadelphia">\r
+<Percentage>.986</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1800</Put_Outs>\r
+<Assists>720</Assists>\r
+<Errors>37</Errors>\r
+<Total_Chances>2557</Total_Chances>\r
+<Double_Plays>66</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>6</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Florida">\r
+<Percentage>.985</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1896</Put_Outs>\r
+<Assists>695</Assists>\r
+<Errors>39</Errors>\r
+<Total_Chances>2630</Total_Chances>\r
+<Double_Plays>73</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>0</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Los Angeles">\r
+<Percentage>.984</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1900</Put_Outs>\r
+<Assists>758</Assists>\r
+<Errors>42</Errors>\r
+<Total_Chances>2700</Total_Chances>\r
+<Double_Plays>63</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="St. Louis">\r
+<Percentage>.983</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1834</Put_Outs>\r
+<Assists>724</Assists>\r
+<Errors>45</Errors>\r
+<Total_Chances>2603</Total_Chances>\r
+<Double_Plays>71</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>2</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Atlanta">\r
+<Percentage>.982</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1990</Put_Outs>\r
+<Assists>829</Assists>\r
+<Errors>52</Errors>\r
+<Total_Chances>2871</Total_Chances>\r
+<Double_Plays>84</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Milwaukee">\r
+<Percentage>.982</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1900</Put_Outs>\r
+<Assists>749</Assists>\r
+<Errors>49</Errors>\r
+<Total_Chances>2698</Total_Chances>\r
+<Double_Plays>59</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>6</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Chicago">\r
+<Percentage>.982</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1826</Put_Outs>\r
+<Assists>646</Assists>\r
+<Errors>46</Errors>\r
+<Total_Chances>2518</Total_Chances>\r
+<Double_Plays>57</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Pittsburgh">\r
+<Percentage>.981</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1843</Put_Outs>\r
+<Assists>838</Assists>\r
+<Errors>51</Errors>\r
+<Total_Chances>2732</Total_Chances>\r
+<Double_Plays>69</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Cincinnati">\r
+<Percentage>.981</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1855</Put_Outs>\r
+<Assists>737</Assists>\r
+<Errors>51</Errors>\r
+<Total_Chances>2643</Total_Chances>\r
+<Double_Plays>65</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="San Diego">\r
+<Percentage>.980</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1881</Put_Outs>\r
+<Assists>732</Assists>\r
+<Errors>52</Errors>\r
+<Total_Chances>2665</Total_Chances>\r
+<Double_Plays>77</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Colorado">\r
+<Percentage>.979</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1888</Put_Outs>\r
+<Assists>739</Assists>\r
+<Errors>57</Errors>\r
+<Total_Chances>2684</Total_Chances>\r
+<Double_Plays>65</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Montreal">\r
+<Percentage>.978</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1901</Put_Outs>\r
+<Assists>800</Assists>\r
+<Errors>60</Errors>\r
+<Total_Chances>2761</Total_Chances>\r
+<Double_Plays>62</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="New York">\r
+<Percentage>.977</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1898</Put_Outs>\r
+<Assists>705</Assists>\r
+<Errors>61</Errors>\r
+<Total_Chances>2664</Total_Chances>\r
+<Double_Plays>64</Double_Plays>\r
+<Tripple_Plays>1</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+</Fielding_Stats>\r
+<time_stamp> June 21, 2002, at 02:50 PM ET </time_stamp>\r
+</message>\r
-- System imports.
import Data.Either ( rights )
+import Data.String.Utils ( replace )
import Data.Time.Clock ( UTCTime )
import Database.Groundhog (
countAll,
-- | The DTDs for everything that we consider \"Sport Info.\"
--
--- TODO: This is the list from the old implementation. We need to
--- make sure that we are really receiving XML for these DTDs
--- (i.e. the names are correct).
---
dtds :: [String]
dtds =
[ "CBASK_3PPctXML.dtd",
"CBASK_FGPctXML.dtd",
"CBASK_FoulsXML.dtd",
"CBASK_FTPctXML.dtd",
- "Cbask_Indv_No_Avg_XML.dtd", -- no xml
"Cbask_Indv_Scoring_XML.dtd",
- "Cbask_Indv_Shooting_XML.dtd", -- no xml
"CBASK_MinutesXML.dtd",
"Cbask_Polls_XML.dtd",
"CBASK_ReboundsXML.dtd",
"CBASK_ScoringLeadersXML.dtd",
- "CBASK_StealsXML.dtd", -- no xml
- "Cbask_Team_Scoring_Rebound_Margin_XML.dtd", -- no xml
- "Cbask_Team_Scoring_XML.dtd", -- no xml
- "Cbask_Team_Shooting_Pct_XML.dtd", -- no xml
"Cbask_Team_ThreePT_Made_XML.dtd",
"Cbask_Team_ThreePT_PCT_XML.dtd",
"Cbask_Team_Win_Pct_XML.dtd",
"nflfirstdownxml.dtd",
"NFLFumbleLeaderXML.dtd",
"NFLGiveTakeXML.dtd",
- "NFLGrassTurfDomeOutsideXML.dtd", -- no xml
"NFLInside20XML.dtd",
- "NFLInterceptionLeadersXML.dtd", -- no xml
"NFLKickoffsXML.dtd",
"NFLMondayNightXML.dtd",
- "NFLPassingLeadersXML.dtd", -- no xml
"NFLPassLeadXML.dtd",
"NFLQBStartsXML.dtd",
- "NFLReceivingLeadersXML.dtd", -- no xml
- "NFLRushingLeadersXML.dtd", -- no xml
"NFLSackLeadersXML.dtd",
"nflstandxml.dtd",
- "NFLTackleFFLeadersXML.dtd", -- no xml
"NFLTeamRankingsXML.dtd",
- "NFLTopKickoffReturnXML.dtd", -- no xml
"NFLTopPerformanceXML.dtd",
- "NFLTopPuntReturnXML.dtd", -- no xml
"NFLTotalYardageXML.dtd",
- "NFLYardsXML.dtd", -- no xml
"NFL_KickingLeaders_XML.dtd",
"NFL_NBA_Draft_XML.dtd",
- "NFL_PuntingLeaders_XML.dtd", -- no xml
"NFL_Roster_XML.dtd",
"NFL_Team_Stats_XML.dtd",
"Transactions_XML.dtd",
--
sport_info_test_files :: [FilePath]
sport_info_test_files =
- map ("test/xml/sportinfo/" ++) [
- "CBASK_3PPctXML.xml",
- "Cbask_All_Tourn_Teams_XML.xml",
- "CBASK_AssistsXML.xml",
- "Cbask_Awards_XML.xml",
- "CBASK_BlocksXML.xml",
- "Cbask_Conf_Standings_XML.xml",
- "Cbask_DivII_III_Indv_Stats_XML.xml",
- "Cbask_DivII_Team_Stats_XML.xml",
- "Cbask_DivIII_Team_Stats_XML.xml",
- "CBASK_FGPctXML.xml",
- "CBASK_FoulsXML.xml",
- "CBASK_FTPctXML.xml",
- "Cbask_Indv_Scoring_XML.xml",
- "CBASK_MinutesXML.xml",
- "Cbask_Polls_XML.xml",
- "CBASK_ReboundsXML.xml",
- "CBASK_ScoringLeadersXML.xml",
- "Cbask_Team_ThreePT_Made_XML.xml",
- "Cbask_Team_ThreePT_PCT_XML.xml",
- "Cbask_Team_Win_Pct_XML.xml",
- "Cbask_Top_Twenty_Five_XML.xml",
- "CBASK_TopTwentyFiveResult_XML.xml",
- "Cbask_Tourn_Awards_XML.xml",
- "Cbask_Tourn_Champs_XML.xml",
- "Cbask_Tourn_Indiv_XML.xml",
- "Cbask_Tourn_Leaders_XML.xml",
- "Cbask_Tourn_MVP_XML.xml",
- "Cbask_Tourn_Records_XML.xml",
- "LeagueScheduleXML.xml",
- "minorscoresxml.xml",
- "Minor_Baseball_League_Leaders_XML.xml",
- "Minor_Baseball_Standings_XML.xml",
- "Minor_Baseball_Transactions_XML.xml",
- "mlbbattingavgxml.xml",
- "mlbdoublesleadersxml.xml",
- "MLBGamesPlayedXML.xml",
- "MLBGIDPXML.xml",
- "MLBHitByPitchXML.xml",
- "mlbhitsleadersxml.xml",
- "mlbhomerunsxml.xml",
- "MLBHRFreqXML.xml",
- "MLBIntWalksXML.xml",
- "MLBKORateXML.xml",
- "mlbonbasepctxml.xml",
- "MLBOPSXML.xml",
- "MLBPlateAppsXML.xml",
- "mlbrbisxml.xml",
- "mlbrunsleadersxml.xml",
- "MLBSacFliesXML.xml",
- "MLBSacrificesXML.xml",
- "MLBSBSuccessXML.xml",
- "mlbsluggingpctxml.xml",
- "mlbstandxml.xml",
- "mlbstandxml_preseason.xml",
- "mlbstolenbasexml.xml",
- "mlbtotalbasesleadersxml.xml",
- "mlbtriplesleadersxml.xml",
- "MLBWalkRateXML.xml",
- "mlbwalksleadersxml.xml",
- "MLBXtraBaseHitsXML.xml",
- "MLB_ERA_Leaders.xml",
- "MLB_Pitching_Appearances_Leaders.xml",
- "MLB_Pitching_Balks_Leaders.xml",
- "MLB_Pitching_CG_Leaders.xml",
- "MLB_Pitching_ER_Allowed_Leaders.xml",
- "MLB_Pitching_Hits_Allowed_Leaders.xml",
- "MLB_Pitching_Hit_Batters_Leaders.xml",
- "MLB_Pitching_HR_Allowed_Leaders.xml",
- "MLB_Pitching_IP_Leaders.xml",
- "MLB_Pitching_Runs_Allowed_Leaders.xml",
- "MLB_Pitching_Saves_Leaders.xml",
- "MLB_Pitching_Shut_Outs_Leaders.xml",
- "MLB_Pitching_Starts_Leaders.xml",
- "MLB_Pitching_Strike_Outs_Leaders.xml",
- "MLB_Pitching_Walks_Leaders.xml",
- "MLB_Pitching_WHIP_Leaders.xml",
- "MLB_Pitching_Wild_Pitches_Leaders.xml",
- "MLB_Pitching_Win_Percentage_Leaders.xml",
- "MLB_Pitching_WL_Leaders.xml",
- "NBA_Team_Stats_XML.xml",
- "NBA3PPctXML.xml",
- "NBAAssistsXML.xml",
- "NBABlocksXML.xml",
- "nbaconfrecxml.xml",
- "nbadaysxml.xml",
- "nbadivisionsxml.xml",
- "NBAFGPctXML.xml",
- "NBAFoulsXML.xml",
- "NBAFTPctXML.xml",
- "NBAMinutesXML.xml",
- "NBAReboundsXML.xml",
- "NBAScorersXML.xml",
- "nbastandxml.xml",
- "NBAStealsXML.xml",
- "nbateamleadersxml.xml",
- "nbatripledoublexml.xml",
- "NBATurnoversXML.xml",
- "NCAA_Conference_Schedule_XML.xml",
- "nflfirstdownxml.xml",
- "NFLFumbleLeaderXML.xml",
- "NFLGiveTakeXML.xml",
- "NFLInside20XML.xml",
- "NFLKickoffsXML.xml",
- "NFLMondayNightXML.xml",
- "NFLPassLeadXML.xml",
- "NFLQBStartsXML.xml",
- "NFLSackLeadersXML.xml",
- "nflstandxml.xml",
- "NFLTeamRankingsXML.xml",
- "NFLTopPerformanceXML.xml",
- "NFLTotalYardageXML.xml",
- "NFL_KickingLeaders_XML.xml",
- "NFL_NBA_Draft_XML.xml",
- "NFL_Roster_XML.xml",
- "NFL_Team_Stats_XML.xml",
- "Transactions_XML.xml",
- "Weekly_Sched_XML.xml",
- "WNBA_Team_Leaders_XML.xml",
- "WNBA3PPctXML.xml",
- "WNBAAssistsXML.xml",
- "WNBABlocksXML.xml",
- "WNBAFGPctXML.xml",
- "WNBAFoulsXML.xml",
- "WNBAFTPctXML.xml",
- "WNBAMinutesXML.xml",
- "WNBAReboundsXML.xml",
- "WNBAScorersXML.xml",
- "wnbastandxml.xml",
- "WNBAStealsXML.xml",
- "WNBATurnoversXML.xml" ]
-
+ map (change_suffix . add_path) dtds
+ where
+ add_path = ("test/xml/sportinfo/" ++ )
+ change_suffix = replace ".dtd" ".xml"
-- | Make sure we can parse every element of 'sport_info_test_files'.
--- /dev/null
+<!ELEMENT message (XML_File_ID, heading , category , sport , Title , Fielding_Stats+ , time_stamp )>\r
+\r
+<!ELEMENT XML_File_ID (#PCDATA )>\r
+\r
+<!ELEMENT heading (#PCDATA )>\r
+\r
+<!ELEMENT category (#PCDATA )>\r
+\r
+<!ELEMENT sport (#PCDATA )>\r
+\r
+<!ELEMENT Title (#PCDATA )>\r
+\r
+<!ELEMENT Fielding_Stats (Listing+ )>\r
+<!ATTLIST Fielding_Stats League CDATA #REQUIRED >\r
+<!ELEMENT Listing (Percentage , Games , Put_Outs , Assists , Errors , Total_Chances , Double_Plays , Tripple_Plays , Pass_Balls )>\r
+<!ATTLIST Listing Team CDATA #REQUIRED >\r
+<!ELEMENT Percentage (#PCDATA )>\r
+\r
+<!ELEMENT Games (#PCDATA )>\r
+\r
+<!ELEMENT Put_Outs (#PCDATA )>\r
+\r
+<!ELEMENT Assists (#PCDATA )>\r
+\r
+<!ELEMENT Errors (#PCDATA )>\r
+\r
+<!ELEMENT Total_Chances (#PCDATA )>\r
+\r
+<!ELEMENT Double_Plays (#PCDATA )>\r
+\r
+<!ELEMENT Tripple_Plays (#PCDATA )>\r
+\r
+<!ELEMENT Pass_Balls (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp (#PCDATA )>\r
+\r
--- /dev/null
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "MLB_Fielding_XML.dtd">\r
+<message>\r
+<XML_File_ID>82828217</XML_File_ID>\r
+<heading>AAX%TEAM-FIELDING</heading>\r
+<category>Statistics</category>\r
+<sport>MLB</sport>\r
+<Title>2002 MLB Team Statistics - Fielding</Title>\r
+<Fielding_Stats League="American League">\r
+<Listing Team="Oakland">\r
+<Percentage>.986</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1875</Put_Outs>\r
+<Assists>767</Assists>\r
+<Errors>37</Errors>\r
+<Total_Chances>2679</Total_Chances>\r
+<Double_Plays>64</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Baltimore">\r
+<Percentage>.985</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1861</Put_Outs>\r
+<Assists>780</Assists>\r
+<Errors>40</Errors>\r
+<Total_Chances>2681</Total_Chances>\r
+<Double_Plays>78</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>11</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Minnesota">\r
+<Percentage>.985</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1920</Put_Outs>\r
+<Assists>660</Assists>\r
+<Errors>40</Errors>\r
+<Total_Chances>2620</Total_Chances>\r
+<Double_Plays>56</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>2</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Boston">\r
+<Percentage>.984</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1819</Put_Outs>\r
+<Assists>720</Assists>\r
+<Errors>40</Errors>\r
+<Total_Chances>2579</Total_Chances>\r
+<Double_Plays>61</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>9</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Anaheim">\r
+<Percentage>.984</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1832</Put_Outs>\r
+<Assists>666</Assists>\r
+<Errors>41</Errors>\r
+<Total_Chances>2539</Total_Chances>\r
+<Double_Plays>66</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Texas">\r
+<Percentage>.983</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1834</Put_Outs>\r
+<Assists>755</Assists>\r
+<Errors>45</Errors>\r
+<Total_Chances>2634</Total_Chances>\r
+<Double_Plays>69</Double_Plays>\r
+<Tripple_Plays>1</Tripple_Plays>\r
+<Pass_Balls>8</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Seattle">\r
+<Percentage>.982</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1871</Put_Outs>\r
+<Assists>709</Assists>\r
+<Errors>46</Errors>\r
+<Total_Chances>2626</Total_Chances>\r
+<Double_Plays>57</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Chicago">\r
+<Percentage>.982</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1869</Put_Outs>\r
+<Assists>730</Assists>\r
+<Errors>48</Errors>\r
+<Total_Chances>2647</Total_Chances>\r
+<Double_Plays>73</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Cleveland">\r
+<Percentage>.981</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1862</Put_Outs>\r
+<Assists>727</Assists>\r
+<Errors>50</Errors>\r
+<Total_Chances>2639</Total_Chances>\r
+<Double_Plays>73</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>7</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Tampa Bay">\r
+<Percentage>.981</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1854</Put_Outs>\r
+<Assists>673</Assists>\r
+<Errors>50</Errors>\r
+<Total_Chances>2577</Total_Chances>\r
+<Double_Plays>76</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Toronto">\r
+<Percentage>.980</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1830</Put_Outs>\r
+<Assists>691</Assists>\r
+<Errors>52</Errors>\r
+<Total_Chances>2573</Total_Chances>\r
+<Double_Plays>50</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Kansas City">\r
+<Percentage>.979</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1774</Put_Outs>\r
+<Assists>703</Assists>\r
+<Errors>53</Errors>\r
+<Total_Chances>2530</Total_Chances>\r
+<Double_Plays>65</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="New York">\r
+<Percentage>.979</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1910</Put_Outs>\r
+<Assists>661</Assists>\r
+<Errors>55</Errors>\r
+<Total_Chances>2626</Total_Chances>\r
+<Double_Plays>45</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Detroit">\r
+<Percentage>.978</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1815</Put_Outs>\r
+<Assists>748</Assists>\r
+<Errors>58</Errors>\r
+<Total_Chances>2621</Total_Chances>\r
+<Double_Plays>54</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>14</Pass_Balls>\r
+</Listing>\r
+</Fielding_Stats>\r
+<Fielding_Stats League="National League">\r
+<Listing Team="Arizona">\r
+<Percentage>.988</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1875</Put_Outs>\r
+<Assists>659</Assists>\r
+<Errors>32</Errors>\r
+<Total_Chances>2566</Total_Chances>\r
+<Double_Plays>51</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>8</Pass_Balls>\r
+</Listing>\r
+<Listing Team="San Francisco">\r
+<Percentage>.987</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1827</Put_Outs>\r
+<Assists>715</Assists>\r
+<Errors>33</Errors>\r
+<Total_Chances>2575</Total_Chances>\r
+<Double_Plays>90</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Houston">\r
+<Percentage>.986</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1862</Put_Outs>\r
+<Assists>685</Assists>\r
+<Errors>35</Errors>\r
+<Total_Chances>2582</Total_Chances>\r
+<Double_Plays>55</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Philadelphia">\r
+<Percentage>.986</Percentage>\r
+<Games>68</Games>\r
+<Put_Outs>1800</Put_Outs>\r
+<Assists>720</Assists>\r
+<Errors>37</Errors>\r
+<Total_Chances>2557</Total_Chances>\r
+<Double_Plays>66</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>6</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Florida">\r
+<Percentage>.985</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1896</Put_Outs>\r
+<Assists>695</Assists>\r
+<Errors>39</Errors>\r
+<Total_Chances>2630</Total_Chances>\r
+<Double_Plays>73</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>0</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Los Angeles">\r
+<Percentage>.984</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1900</Put_Outs>\r
+<Assists>758</Assists>\r
+<Errors>42</Errors>\r
+<Total_Chances>2700</Total_Chances>\r
+<Double_Plays>63</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="St. Louis">\r
+<Percentage>.983</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1834</Put_Outs>\r
+<Assists>724</Assists>\r
+<Errors>45</Errors>\r
+<Total_Chances>2603</Total_Chances>\r
+<Double_Plays>71</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>2</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Atlanta">\r
+<Percentage>.982</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1990</Put_Outs>\r
+<Assists>829</Assists>\r
+<Errors>52</Errors>\r
+<Total_Chances>2871</Total_Chances>\r
+<Double_Plays>84</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Milwaukee">\r
+<Percentage>.982</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1900</Put_Outs>\r
+<Assists>749</Assists>\r
+<Errors>49</Errors>\r
+<Total_Chances>2698</Total_Chances>\r
+<Double_Plays>59</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>6</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Chicago">\r
+<Percentage>.982</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1826</Put_Outs>\r
+<Assists>646</Assists>\r
+<Errors>46</Errors>\r
+<Total_Chances>2518</Total_Chances>\r
+<Double_Plays>57</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Pittsburgh">\r
+<Percentage>.981</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1843</Put_Outs>\r
+<Assists>838</Assists>\r
+<Errors>51</Errors>\r
+<Total_Chances>2732</Total_Chances>\r
+<Double_Plays>69</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Cincinnati">\r
+<Percentage>.981</Percentage>\r
+<Games>69</Games>\r
+<Put_Outs>1855</Put_Outs>\r
+<Assists>737</Assists>\r
+<Errors>51</Errors>\r
+<Total_Chances>2643</Total_Chances>\r
+<Double_Plays>65</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>4</Pass_Balls>\r
+</Listing>\r
+<Listing Team="San Diego">\r
+<Percentage>.980</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1881</Put_Outs>\r
+<Assists>732</Assists>\r
+<Errors>52</Errors>\r
+<Total_Chances>2665</Total_Chances>\r
+<Double_Plays>77</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Colorado">\r
+<Percentage>.979</Percentage>\r
+<Games>71</Games>\r
+<Put_Outs>1888</Put_Outs>\r
+<Assists>739</Assists>\r
+<Errors>57</Errors>\r
+<Total_Chances>2684</Total_Chances>\r
+<Double_Plays>65</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>3</Pass_Balls>\r
+</Listing>\r
+<Listing Team="Montreal">\r
+<Percentage>.978</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1901</Put_Outs>\r
+<Assists>800</Assists>\r
+<Errors>60</Errors>\r
+<Total_Chances>2761</Total_Chances>\r
+<Double_Plays>62</Double_Plays>\r
+<Tripple_Plays>0</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+<Listing Team="New York">\r
+<Percentage>.977</Percentage>\r
+<Games>70</Games>\r
+<Put_Outs>1898</Put_Outs>\r
+<Assists>705</Assists>\r
+<Errors>61</Errors>\r
+<Total_Chances>2664</Total_Chances>\r
+<Double_Plays>64</Double_Plays>\r
+<Tripple_Plays>1</Tripple_Plays>\r
+<Pass_Balls>5</Pass_Balls>\r
+</Listing>\r
+</Fielding_Stats>\r
+<time_stamp> June 21, 2002, at 02:50 PM ET </time_stamp>\r
+</message>\r