]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add SportInfo support for wnbastandxml.dtd.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 23 Jun 2014 19:31:56 +0000 (15:31 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 23 Jun 2014 19:31:56 +0000 (15:31 -0400)
doc/man1/htsn-import.1
schema/wnbastandxml.dtd [new file with mode: 0644]
schemagen/wnbastandxml/wnbastandxml.xml [new file with mode: 0644]
src/TSN/XML/SportInfo.hs
test/xml/sportinfo/wnbastandxml.dtd [new file with mode: 0644]
test/xml/sportinfo/wnbastandxml.xml [new file with mode: 0644]

index 0966ef8da74326f0b808122b543da04056f7066c..044debd40a4b92be3f12a8cf969c3a89f08b294a 100644 (file)
@@ -364,6 +364,8 @@ WNBAMinutesXML.dtd
 WNBAReboundsXML.dtd
 .IP \[bu]
 WNBAScorersXML.dtd
+.IP \[bu]
+wnbastandxml.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/wnbastandxml.dtd b/schema/wnbastandxml.dtd
new file mode 100644 (file)
index 0000000..a851852
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by  () -->\r
+<!--DTD generated by XML Spy v3.5 NT (http://www.xmlspy.com)-->\r
+<!ELEMENT Away (#PCDATA)>\r
+<!ELEMENT Conf (#PCDATA)>\r
+<!ELEMENT Division (Listing+)>\r
+<!ATTLIST Division\r
+       Type (Eastern | Western) #REQUIRED\r
+>\r
+<!ELEMENT GB (#PCDATA)>\r
+<!ELEMENT Home (#PCDATA)>\r
+<!ELEMENT Listing (Team, Won, Lost, Pct, GB, Home, Away, Conf, Streak, Post)>\r
+<!ELEMENT Lost (#PCDATA)>\r
+<!ELEMENT Pct (#PCDATA)>\r
+<!ELEMENT Post (#PCDATA)>\r
+<!ELEMENT Streak (#PCDATA)>\r
+<!ELEMENT Team (#PCDATA)>\r
+<!ELEMENT Won (#PCDATA)>\r
+<!ELEMENT XML_File_ID (#PCDATA)>\r
+<!ELEMENT category (#PCDATA)>\r
+<!ELEMENT heading (#PCDATA)>\r
+<!ELEMENT message (XML_File_ID, heading, category, sport, Division+, time_stamp)>\r
+<!ELEMENT sport (#PCDATA)>\r
+<!ELEMENT time_stamp (#PCDATA)>\r
diff --git a/schemagen/wnbastandxml/wnbastandxml.xml b/schemagen/wnbastandxml/wnbastandxml.xml
new file mode 100644 (file)
index 0000000..9552e1a
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Standings 1.0/EN" "wnbastandxml.dtd">\r
+<message>\r
+<XML_File_ID>2011</XML_File_ID>\r
+<heading>BUL!WNBA-STANDINGS</heading>\r
+<category>Standings</category>\r
+<sport>BASK-W</sport>\r
+<Division Type="Eastern">\r
+<Listing>\r
+<Team>Indiana</Team>\r
+<Won>22</Won><Lost>12</Lost><Pct>.647</Pct><GB>---</GB>\r
+<Home>14-3</Home><Away>8-9</Away><Conf>17-5</Conf><Streak>Lost 2</Streak>\r
+<Post>y</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Atlanta</Team>\r
+<Won>18</Won><Lost>16</Lost><Pct>.529</Pct><GB>4</GB>\r
+<Home>12-5</Home><Away>6-11</Away><Conf>10-12</Conf><Streak>Lost 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Detroit</Team>\r
+<Won>18</Won><Lost>16</Lost><Pct>.529</Pct><GB>4</GB>\r
+<Home>11-6</Home><Away>7-10</Away><Conf>11-11</Conf><Streak>Won 2</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Chicago</Team>\r
+<Won>16</Won><Lost>18</Lost><Pct>.471</Pct><GB>6</GB>\r
+<Home>12-5</Home><Away>4-13</Away><Conf>10-12</Conf><Streak>Lost 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Connecticut</Team>\r
+<Won>16</Won><Lost>18</Lost><Pct>.471</Pct><GB>6</GB>\r
+<Home>12-5</Home><Away>4-13</Away><Conf>10-12</Conf><Streak>Won 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Washington</Team>\r
+<Won>16</Won><Lost>18</Lost><Pct>.471</Pct><GB>6</GB>\r
+<Home>11-6</Home><Away>5-12</Away><Conf>10-12</Conf><Streak>Lost 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>New York</Team>\r
+<Won>13</Won><Lost>21</Lost><Pct>.382</Pct><GB>9</GB>\r
+<Home>8-9</Home><Away>5-12</Away><Conf>9-13</Conf><Streak>Won 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+</Division>\r
+<Division Type="Western">\r
+<Listing>\r
+<Team>Phoenix</Team>\r
+<Won>23</Won><Lost>11</Lost><Pct>.676</Pct><GB>---</GB>\r
+<Home>12-5</Home><Away>11-6</Away><Conf>13-7</Conf><Streak>Lost 1</Streak>\r
+<Post>y</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Seattle</Team>\r
+<Won>20</Won><Lost>14</Lost><Pct>.588</Pct><GB>3</GB>\r
+<Home>13-4</Home><Away>7-10</Away><Conf>13-7</Conf><Streak>Won 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Los Angeles</Team>\r
+<Won>18</Won><Lost>16</Lost><Pct>.529</Pct><GB>5</GB>\r
+<Home>11-6</Home><Away>7-10</Away><Conf>11-9</Conf><Streak>Won 3</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>San Antonio</Team>\r
+<Won>15</Won><Lost>19</Lost><Pct>.441</Pct><GB>8</GB>\r
+<Home>10-7</Home><Away>5-12</Away><Conf>10-10</Conf><Streak>Lost 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Minnesota</Team>\r
+<Won>14</Won><Lost>20</Lost><Pct>.412</Pct><GB>9</GB>\r
+<Home>9-8</Home><Away>5-12</Away><Conf>7-13</Conf><Streak>Lost 2</Streak>\r
+<Post></Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Sacramento</Team>\r
+<Won>12</Won><Lost>22</Lost><Pct>.353</Pct><GB>11</GB>\r
+<Home>7-10</Home><Away>5-12</Away><Conf>6-14</Conf><Streak>Won 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+</Division>\r
+<time_stamp> September 27, 2009, at 07:50 PM ET </time_stamp>\r
+</message>\r
index c2e614daef72141e804081a67143365e23b5a2dc..2cba4d2f5fa9831a7c417946bb7f6457b8d57377 100644 (file)
@@ -210,7 +210,7 @@ dtds =
     "WNBAMinutesXML.dtd",
     "WNBAReboundsXML.dtd",
     "WNBAScorersXML.dtd",
-    "wnbastandxml.dtd", -- no dtd
+    "wnbastandxml.dtd",
     "WNBAStealsXML.dtd", -- no dtd
     "WNBATurnoversXML.dtd" -- no dtd
   ]
@@ -443,7 +443,8 @@ sport_info_test_files =
     "WNBAFTPctXML.xml",
     "WNBAMinutesXML.xml",
     "WNBAReboundsXML.xml",
-    "WNBAScorersXML.xml"
+    "WNBAScorersXML.xml",
+    "wnbastandxml.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/wnbastandxml.dtd b/test/xml/sportinfo/wnbastandxml.dtd
new file mode 100644 (file)
index 0000000..a851852
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by  () -->\r
+<!--DTD generated by XML Spy v3.5 NT (http://www.xmlspy.com)-->\r
+<!ELEMENT Away (#PCDATA)>\r
+<!ELEMENT Conf (#PCDATA)>\r
+<!ELEMENT Division (Listing+)>\r
+<!ATTLIST Division\r
+       Type (Eastern | Western) #REQUIRED\r
+>\r
+<!ELEMENT GB (#PCDATA)>\r
+<!ELEMENT Home (#PCDATA)>\r
+<!ELEMENT Listing (Team, Won, Lost, Pct, GB, Home, Away, Conf, Streak, Post)>\r
+<!ELEMENT Lost (#PCDATA)>\r
+<!ELEMENT Pct (#PCDATA)>\r
+<!ELEMENT Post (#PCDATA)>\r
+<!ELEMENT Streak (#PCDATA)>\r
+<!ELEMENT Team (#PCDATA)>\r
+<!ELEMENT Won (#PCDATA)>\r
+<!ELEMENT XML_File_ID (#PCDATA)>\r
+<!ELEMENT category (#PCDATA)>\r
+<!ELEMENT heading (#PCDATA)>\r
+<!ELEMENT message (XML_File_ID, heading, category, sport, Division+, time_stamp)>\r
+<!ELEMENT sport (#PCDATA)>\r
+<!ELEMENT time_stamp (#PCDATA)>\r
diff --git a/test/xml/sportinfo/wnbastandxml.xml b/test/xml/sportinfo/wnbastandxml.xml
new file mode 100644 (file)
index 0000000..9552e1a
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Standings 1.0/EN" "wnbastandxml.dtd">\r
+<message>\r
+<XML_File_ID>2011</XML_File_ID>\r
+<heading>BUL!WNBA-STANDINGS</heading>\r
+<category>Standings</category>\r
+<sport>BASK-W</sport>\r
+<Division Type="Eastern">\r
+<Listing>\r
+<Team>Indiana</Team>\r
+<Won>22</Won><Lost>12</Lost><Pct>.647</Pct><GB>---</GB>\r
+<Home>14-3</Home><Away>8-9</Away><Conf>17-5</Conf><Streak>Lost 2</Streak>\r
+<Post>y</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Atlanta</Team>\r
+<Won>18</Won><Lost>16</Lost><Pct>.529</Pct><GB>4</GB>\r
+<Home>12-5</Home><Away>6-11</Away><Conf>10-12</Conf><Streak>Lost 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Detroit</Team>\r
+<Won>18</Won><Lost>16</Lost><Pct>.529</Pct><GB>4</GB>\r
+<Home>11-6</Home><Away>7-10</Away><Conf>11-11</Conf><Streak>Won 2</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Chicago</Team>\r
+<Won>16</Won><Lost>18</Lost><Pct>.471</Pct><GB>6</GB>\r
+<Home>12-5</Home><Away>4-13</Away><Conf>10-12</Conf><Streak>Lost 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Connecticut</Team>\r
+<Won>16</Won><Lost>18</Lost><Pct>.471</Pct><GB>6</GB>\r
+<Home>12-5</Home><Away>4-13</Away><Conf>10-12</Conf><Streak>Won 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Washington</Team>\r
+<Won>16</Won><Lost>18</Lost><Pct>.471</Pct><GB>6</GB>\r
+<Home>11-6</Home><Away>5-12</Away><Conf>10-12</Conf><Streak>Lost 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>New York</Team>\r
+<Won>13</Won><Lost>21</Lost><Pct>.382</Pct><GB>9</GB>\r
+<Home>8-9</Home><Away>5-12</Away><Conf>9-13</Conf><Streak>Won 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+</Division>\r
+<Division Type="Western">\r
+<Listing>\r
+<Team>Phoenix</Team>\r
+<Won>23</Won><Lost>11</Lost><Pct>.676</Pct><GB>---</GB>\r
+<Home>12-5</Home><Away>11-6</Away><Conf>13-7</Conf><Streak>Lost 1</Streak>\r
+<Post>y</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Seattle</Team>\r
+<Won>20</Won><Lost>14</Lost><Pct>.588</Pct><GB>3</GB>\r
+<Home>13-4</Home><Away>7-10</Away><Conf>13-7</Conf><Streak>Won 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Los Angeles</Team>\r
+<Won>18</Won><Lost>16</Lost><Pct>.529</Pct><GB>5</GB>\r
+<Home>11-6</Home><Away>7-10</Away><Conf>11-9</Conf><Streak>Won 3</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>San Antonio</Team>\r
+<Won>15</Won><Lost>19</Lost><Pct>.441</Pct><GB>8</GB>\r
+<Home>10-7</Home><Away>5-12</Away><Conf>10-10</Conf><Streak>Lost 1</Streak>\r
+<Post>x</Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Minnesota</Team>\r
+<Won>14</Won><Lost>20</Lost><Pct>.412</Pct><GB>9</GB>\r
+<Home>9-8</Home><Away>5-12</Away><Conf>7-13</Conf><Streak>Lost 2</Streak>\r
+<Post></Post>\r
+</Listing>\r
+<Listing>\r
+<Team>Sacramento</Team>\r
+<Won>12</Won><Lost>22</Lost><Pct>.353</Pct><GB>11</GB>\r
+<Home>7-10</Home><Away>5-12</Away><Conf>6-14</Conf><Streak>Won 1</Streak>\r
+<Post></Post>\r
+</Listing>\r
+</Division>\r
+<time_stamp> September 27, 2009, at 07:50 PM ET </time_stamp>\r
+</message>\r