]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add a sample contained Detailed_Weather to the weatherxml schemagen.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 5 Jul 2014 17:35:20 +0000 (13:35 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 5 Jul 2014 17:35:20 +0000 (13:35 -0400)
Update the test/schema DTD for weatherxml.

schema/weatherxml.dtd
schemagen/weatherxml/21379214.xml [new file with mode: 0644]
test/xml/weatherxml.dtd

index cce90b3089622e00293471bf9445db202b31d127..0c85b1654ccbe185e27395f5acd1bab08150d370 100644 (file)
@@ -7,9 +7,23 @@
 <!ELEMENT weather (#PCDATA)>
 <!ELEMENT listing ( ( teams, weather ) )>
 <!ELEMENT league ( listing* )>
-<!ELEMENT forecast ( league )>
+<!ELEMENT forecast ( league* )>
 <!ELEMENT time_stamp (#PCDATA)>
-<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, forecast*, time_stamp ) )>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, forecast*, Detailed_Weather?, time_stamp ) )>
+<!ELEMENT Sportcode (#PCDATA)>
+<!ELEMENT GameID (#PCDATA)>
+<!ELEMENT Gamedate (#PCDATA)>
+<!ELEMENT AwayTeam (#PCDATA)>
+<!ELEMENT HomeTeam (#PCDATA)>
+<!ELEMENT WeatherType (#PCDATA)>
+<!ELEMENT Description (#PCDATA)>
+<!ELEMENT TempAdjust (#PCDATA)>
+<!ELEMENT Temperature (#PCDATA)>
+<!ELEMENT Item ( ( Sportcode, GameID, Gamedate, AwayTeam, HomeTeam, WeatherType, Description, TempAdjust, Temperature ) )>
+<!ELEMENT DW_Listing ( Item* )>
+<!ELEMENT Detailed_Weather ( DW_Listing* )>
 
 <!ATTLIST league name CDATA #REQUIRED>
 <!ATTLIST forecast gamedate CDATA #REQUIRED>
+<!ATTLIST DW_Listing SportCode CDATA #REQUIRED>
+<!ATTLIST DW_Listing Sport CDATA #REQUIRED>
diff --git a/schemagen/weatherxml/21379214.xml b/schemagen/weatherxml/21379214.xml
new file mode 100644 (file)
index 0000000..6c86f4d
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no" ?>\r<!DOCTYPE message PUBLIC "-//TSN//DTD Weather 1.0/EN" "weatherxml.dtd">\r<message>\r<XML_File_ID>21379214</XML_File_ID>\r<heading>AAW%BBWEATHER</heading>\r<category>Weather</category>\r<sport>MLB</sport>\r<title>Major League Baseball Weather from The Sports Network</title>\r<forecast gamedate="Friday, July 4th">\r<league name="National League">\r<listing>\r<teams>Chicago Cubs at Washington Nationals, 11:05 a.m.</teams>\r<weather>Mostly cloudy. Winds blowing in from left field at 10-15 m.p.h.  Game-time temperature: Around 75.</weather>\r</listing>\r<listing>\r<teams>Philadelphia Phillies at Pittsburgh Pirates, 5:05 p.m.</teams>\r<weather>Sunny. Winds blowing out to right field at 10-15 m.p.h.  Game-time temperature: Near 75.</weather>\r</listing>\r<listing>\r<teams>San Francisco Giants at San Diego Padres, 6:40 p.m.</teams>\r<weather>Partly cloudy. Winds blowing out to right field at 5-10 m.p.h.  Game-time temperature: Around 75.</weather>\r</listing>\r<listing>\r<teams>Milwaukee Brewers at Cincinnati Reds, 7:10 p.m.</teams>\r<weather>Sunny. Winds blowing out to right field at 5-10 m.p.h.  Game-time temperature: Near 75.</weather>\r</listing>\r<listing>\r<teams>Miami Marlins at St. Louis Cardinals, 7:15 p.m.</teams>\r<weather>Sunny. Winds blowing in from right field at 5-10 m.p.h.  Game-time temperature: Near 80.</weather>\r</listing>\r<listing>\r<teams>Arizona Diamondbacks at Atlanta Braves, 7:35 p.m.</teams>\r<weather>Mostly sunny. Winds blowing in from left field at 5-10 m.p.h.  Game-time temperature: Around 80.</weather>\r</listing>\r<listing>\r<teams>Los Angeles Dodgers at Colorado Rockies, 8:10 p.m.</teams>\r<weather>Partly cloudy with a 30-percent chance of rain. Winds blowing out to right  field at 5-10 m.p.h.  Game-time temperature: Around 80.</weather>\r</listing>\r</league>\r<league name="Interleague">\r<listing>\r<teams>Texas Rangers at New York Mets, 7:10 p.m.</teams>\r<weather>Partly cloudy. Winds blowing in from left field at 10-20 m.p.h.  Game-time temperature: Near 75.</weather>\r</listing>\r</league>\r<league name="American League">\r<listing>\r<teams>Baltimore Orioles at Boston Red Sox, 1:35 p.m.</teams>\r<weather>Cloudy with a 90-percent chance of rain. Winds blowing in from left field at  10-15 m.p.h.  Game-time temperature: Around 75.</weather>\r</listing>\r<listing>\r<teams>New York Yankees at Minnesota Twins, 3:10 p.m.</teams>\r<weather>Partly cloudy. Winds blowing in from right field at 10-15 m.p.h.  Game-time temperature: Around 75.</weather>\r</listing>\r<listing>\r<teams>Toronto Blue Jays at Oakland Athletics, 4:05 p.m.</teams>\r<weather>Sunny. Winds blowing out to center field at 10-15 m.p.h.  Game-time temperature: Around 65.</weather>\r</listing>\r<listing>\r<teams>Tampa Bay Rays at Detroit Tigers, 7:08 p.m.</teams>\r<weather>Sunny. Winds blowing out to right field at 5-10 m.p.h.  Game-time temperature: Around 75.</weather>\r</listing>\r<listing>\r<teams>Kansas City Royals at Cleveland Indians, 7:05 p.m.</teams>\r<weather>Sunny. Winds blowing in from left field at 5-10 m.p.h.  Game-time temperature: Near 70.</weather>\r</listing>\r<listing>\r<teams>Seattle Mariners at Chicago White Sox, 7:10 p.m.</teams>\r<weather>Sunny. Winds blowing in from center field at 5-10 m.p.h.  Game-time temperature: Around 60.</weather>\r</listing>\r<listing>\r<teams>Houston Astros at LA Angels of Anaheim, 9:05 p.m.</teams>\r<weather>Mostly sunny. Winds blowing out to center field at 5-10 m.p.h.  Game-time temperature: Around 80.</weather>\r</listing>\r</league>\r</forecast>\r<Detailed_Weather>\r<DW_Listing SportCode="AA" Sport="MLB">\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40439</GameID>\r<Gamedate>7/4/2014 11:05:00 AM</Gamedate>\r<AwayTeam>Chicago Cubs</AwayTeam>\r<HomeTeam>Washington Nationals</HomeTeam>\r<WeatherType>3</WeatherType>\r<Description>Mostly cloudy. Winds blowing in from left field at 10-15 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40442</GameID>\r<Gamedate>7/4/2014 5:05:00 PM</Gamedate>\r<AwayTeam>Philadelphia Phillies</AwayTeam>\r<HomeTeam>Pittsburgh Pirates</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing out to right field at 10-15 m.p.h.</Description>\r<TempAdjust>Near</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40445</GameID>\r<Gamedate>7/4/2014 6:40:00 PM</Gamedate>\r<AwayTeam>San Francisco Giants</AwayTeam>\r<HomeTeam>San Diego Padres</HomeTeam>\r<WeatherType>2</WeatherType>\r<Description>Partly cloudy. Winds blowing out to right field at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40443</GameID>\r<Gamedate>7/4/2014 7:10:00 PM</Gamedate>\r<AwayTeam>Milwaukee Brewers</AwayTeam>\r<HomeTeam>Cincinnati Reds</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing out to right field at 5-10 m.p.h.</Description>\r<TempAdjust>Near</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40444</GameID>\r<Gamedate>7/4/2014 7:15:00 PM</Gamedate>\r<AwayTeam>Miami Marlins</AwayTeam>\r<HomeTeam>St. Louis Cardinals</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing in from right field at 5-10 m.p.h.</Description>\r<TempAdjust>Near</TempAdjust>\r<Temperature>80</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40441</GameID>\r<Gamedate>7/4/2014 7:35:00 PM</Gamedate>\r<AwayTeam>Arizona Diamondbacks</AwayTeam>\r<HomeTeam>Atlanta Braves</HomeTeam>\r<WeatherType>1</WeatherType>\r<Description>Mostly sunny. Winds blowing in from left field at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>80</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40446</GameID>\r<Gamedate>7/4/2014 8:10:00 PM</Gamedate>\r<AwayTeam>Los Angeles Dodgers</AwayTeam>\r<HomeTeam>Colorado Rockies</HomeTeam>\r<WeatherType>2</WeatherType>\r<Description>Partly cloudy with a 30-percent chance of rain. Winds blowing out to right field at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>80</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40440</GameID>\r<Gamedate>7/4/2014 7:10:00 PM</Gamedate>\r<AwayTeam>Texas Rangers</AwayTeam>\r<HomeTeam>New York Mets</HomeTeam>\r<WeatherType>2</WeatherType>\r<Description>Partly cloudy. Winds blowing in from left field at 10-20 m.p.h.</Description>\r<TempAdjust>Near</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40432</GameID>\r<Gamedate>7/4/2014 1:35:00 PM</Gamedate>\r<AwayTeam>Baltimore Orioles</AwayTeam>\r<HomeTeam>Boston Red Sox</HomeTeam>\r<WeatherType>3</WeatherType>\r<Description>Cloudy with a 90-percent chance of rain. Winds blowing in from left field at 10-15 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40436</GameID>\r<Gamedate>7/4/2014 3:10:00 PM</Gamedate>\r<AwayTeam>New York Yankees</AwayTeam>\r<HomeTeam>Minnesota Twins</HomeTeam>\r<WeatherType>2</WeatherType>\r<Description>Partly cloudy. Winds blowing in from right field at 10-15 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40437</GameID>\r<Gamedate>7/4/2014 4:05:00 PM</Gamedate>\r<AwayTeam>Toronto Blue Jays</AwayTeam>\r<HomeTeam>Oakland Athletics</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing out to center field at 10-15 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>65</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40434</GameID>\r<Gamedate>7/4/2014 7:08:00 PM</Gamedate>\r<AwayTeam>Tampa Bay Rays</AwayTeam>\r<HomeTeam>Detroit Tigers</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing out to right field at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>75</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40433</GameID>\r<Gamedate>7/4/2014 7:05:00 PM</Gamedate>\r<AwayTeam>Kansas City Royals</AwayTeam>\r<HomeTeam>Cleveland Indians</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing in from left field at 5-10 m.p.h.</Description>\r<TempAdjust>Near</TempAdjust>\r<Temperature>70</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40435</GameID>\r<Gamedate>7/4/2014 7:10:00 PM</Gamedate>\r<AwayTeam>Seattle Mariners</AwayTeam>\r<HomeTeam>Chicago White Sox</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds blowing in from center field at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>60</Temperature>\r</Item>\r<Item>\r<Sportcode>AA</Sportcode>\r<GameID>40438</GameID>\r<Gamedate>7/4/2014 9:05:00 PM</Gamedate>\r<AwayTeam>Houston Astros</AwayTeam>\r<HomeTeam>LA Angels of Anaheim</HomeTeam>\r<WeatherType>1</WeatherType>\r<Description>Mostly sunny. Winds blowing out to center field at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>80</Temperature>\r</Item>\r</DW_Listing>\r<DW_Listing SportCode="AB" Sport="NFL">\r</DW_Listing>\r<DW_Listing SportCode="AJ" Sport="CFL">\r<Item>\r<Sportcode>AJ</Sportcode>\r<GameID>1223</GameID>\r<Gamedate>7/4/2014 7:00:00 PM</Gamedate>\r<AwayTeam>British Columbia Lions</AwayTeam>\r<HomeTeam>Montreal Alouettes</HomeTeam>\r<WeatherType>2</WeatherType>\r<Description>Partly cloudy. Winds northwest at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>65</Temperature>\r</Item>\r<Item>\r<Sportcode>AJ</Sportcode>\r<GameID>1224</GameID>\r<Gamedate>7/4/2014 10:00:00 PM</Gamedate>\r<AwayTeam>Hamilton Tiger-Cats</AwayTeam>\r<HomeTeam>Edmonton Eskimos</HomeTeam>\r<WeatherType>1</WeatherType>\r<Description>Mostly sunny. Winds northwest at 5-10 m.p.h.</Description>\r<TempAdjust>Around</TempAdjust>\r<Temperature>70</Temperature>\r</Item>\r<Item>\r<Sportcode>AJ</Sportcode>\r<GameID>1225</GameID>\r<Gamedate>7/5/2014 3:00:00 PM</Gamedate>\r<AwayTeam>Saskatchewan Roughriders</AwayTeam>\r<HomeTeam>Toronto Argonauts</HomeTeam>\r<WeatherType>0</WeatherType>\r<Description>Sunny. Winds west at 5-10 m.p.h.</Description>\r<TempAdjust>Near</TempAdjust>\r<Temperature>80</Temperature>\r</Item>\r</DW_Listing>\r<DW_Listing SportCode="AF" Sport="CFOOT">\r</DW_Listing>\r</Detailed_Weather>\r<time_stamp> July 4, 2014, at 08:53 AM ET </time_stamp>\r</message>\r
\ No newline at end of file
index cce90b3089622e00293471bf9445db202b31d127..0c85b1654ccbe185e27395f5acd1bab08150d370 100644 (file)
@@ -7,9 +7,23 @@
 <!ELEMENT weather (#PCDATA)>
 <!ELEMENT listing ( ( teams, weather ) )>
 <!ELEMENT league ( listing* )>
-<!ELEMENT forecast ( league )>
+<!ELEMENT forecast ( league* )>
 <!ELEMENT time_stamp (#PCDATA)>
-<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, forecast*, time_stamp ) )>
+<!ELEMENT message ( ( XML_File_ID, heading, category, sport, title, forecast*, Detailed_Weather?, time_stamp ) )>
+<!ELEMENT Sportcode (#PCDATA)>
+<!ELEMENT GameID (#PCDATA)>
+<!ELEMENT Gamedate (#PCDATA)>
+<!ELEMENT AwayTeam (#PCDATA)>
+<!ELEMENT HomeTeam (#PCDATA)>
+<!ELEMENT WeatherType (#PCDATA)>
+<!ELEMENT Description (#PCDATA)>
+<!ELEMENT TempAdjust (#PCDATA)>
+<!ELEMENT Temperature (#PCDATA)>
+<!ELEMENT Item ( ( Sportcode, GameID, Gamedate, AwayTeam, HomeTeam, WeatherType, Description, TempAdjust, Temperature ) )>
+<!ELEMENT DW_Listing ( Item* )>
+<!ELEMENT Detailed_Weather ( DW_Listing* )>
 
 <!ATTLIST league name CDATA #REQUIRED>
 <!ATTLIST forecast gamedate CDATA #REQUIRED>
+<!ATTLIST DW_Listing SportCode CDATA #REQUIRED>
+<!ATTLIST DW_Listing Sport CDATA #REQUIRED>