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

index 450ad7a9b9cbac19a0e2d1b71aadf83ff3e66ea6..0a9043743dfc3f60199225d173ec8b89823a341f 100644 (file)
@@ -120,6 +120,8 @@ CBASK_AssistsXML.dtd
 Cbask_Awards_XML.dtd
 .IP \[bu]
 CBASK_BlocksXML.dtd
+.IP \[bu]
+Cbask_Conf_Standings_XML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/Cbask_Conf_Standings_XML.dtd b/schema/Cbask_Conf_Standings_XML.dtd
new file mode 100644 (file)
index 0000000..dc42e5a
--- /dev/null
@@ -0,0 +1,26 @@
+<!ELEMENT message  (XML_File_ID, heading ,  category , sport , title , Conf_Standings , 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 Conf_Standings  (Standings+ )>\r
+\r
+<!ELEMENT Standings  (Record+ )>\r
+<!ATTLIST Standings  School CDATA  #REQUIRED >\r
+<!ELEMENT Record  (Wins , Loss , Win_Percentage )>\r
+<!ATTLIST Record  Type CDATA  #REQUIRED >\r
+<!ELEMENT Wins  (#PCDATA )>\r
+\r
+<!ELEMENT Loss  (#PCDATA )>\r
+\r
+<!ELEMENT Win_Percentage  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/Cbask_Conf_Standings_XML/Cbask_Conf_Standings_XML.xml b/schemagen/Cbask_Conf_Standings_XML/Cbask_Conf_Standings_XML.xml
new file mode 100644 (file)
index 0000000..b7f13ec
--- /dev/null
@@ -0,0 +1,132 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Cbask_Conf_Standings_XML.dtd">\r
+<message>\r
+<XML_File_ID>1023917</XML_File_ID>\r
+<heading>AEL!01MAAC-STAND</heading>\r
+<category>Previews</category>\r
+<sport>CBASK</sport>\r
+<title>Metro Atlantic Athletic Conference Basketball Standings</title>\r
+<Conf_Standings>\r
+<Standings School="Marist">\r
+<Record Type="Conference">\r
+<Wins>10</Wins>\r
+<Loss>3</Loss>\r
+<Win_Percentage>.769</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>16</Wins>\r
+<Loss>6</Loss>\r
+<Win_Percentage>.727</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Manhattan">\r
+<Record Type="Conference">\r
+<Wins>9</Wins>\r
+<Loss>3</Loss>\r
+<Win_Percentage>.750</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>17</Wins>\r
+<Loss>4</Loss>\r
+<Win_Percentage>.810</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Rider">\r
+<Record Type="Conference">\r
+<Wins>9</Wins>\r
+<Loss>3</Loss>\r
+<Win_Percentage>.750</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>13</Wins>\r
+<Loss>8</Loss>\r
+<Win_Percentage>.619</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Siena">\r
+<Record Type="Conference">\r
+<Wins>8</Wins>\r
+<Loss>5</Loss>\r
+<Win_Percentage>.615</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>11</Wins>\r
+<Loss>14</Loss>\r
+<Win_Percentage>.440</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Niagara">\r
+<Record Type="Conference">\r
+<Wins>7</Wins>\r
+<Loss>5</Loss>\r
+<Win_Percentage>.583</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>11</Wins>\r
+<Loss>12</Loss>\r
+<Win_Percentage>.478</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Iona">\r
+<Record Type="Conference">\r
+<Wins>7</Wins>\r
+<Loss>7</Loss>\r
+<Win_Percentage>.500</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>10</Wins>\r
+<Loss>15</Loss>\r
+<Win_Percentage>.400</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Fairfield">\r
+<Record Type="Conference">\r
+<Wins>5</Wins>\r
+<Loss>7</Loss>\r
+<Win_Percentage>.417</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>6</Wins>\r
+<Loss>14</Loss>\r
+<Win_Percentage>.300</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Canisius">\r
+<Record Type="Conference">\r
+<Wins>3</Wins>\r
+<Loss>9</Loss>\r
+<Win_Percentage>.250</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>6</Wins>\r
+<Loss>15</Loss>\r
+<Win_Percentage>.286</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="St. Peter's">\r
+<Record Type="Conference">\r
+<Wins>3</Wins>\r
+<Loss>10</Loss>\r
+<Win_Percentage>.231</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>4</Wins>\r
+<Loss>17</Loss>\r
+<Win_Percentage>.190</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Loyola-MD">\r
+<Record Type="Conference">\r
+<Wins>2</Wins>\r
+<Loss>11</Loss>\r
+<Win_Percentage>.154</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>3</Wins>\r
+<Loss>19</Loss>\r
+<Win_Percentage>.136</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+</Conf_Standings>\r
+<time_stamp> February 8, 2002, at 03:33 PM ET </time_stamp>\r
+</message>\r
index d47f1c1ba88ef6ebd2be2c0659b8bdab9e7630ee..af05d254381693504bbc7b1402956160e8ede9a7 100644 (file)
@@ -71,7 +71,7 @@ dtds =
     "CBASK_AssistsXML.dtd",
     "Cbask_Awards_XML.dtd",
     "CBASK_BlocksXML.dtd",
-    "Cbask_Conf_Standings_XML.dtd", -- no dtd
+    "Cbask_Conf_Standings_XML.dtd",
     "Cbask_DivII_III_Indv_Stats_XML.dtd", -- no dtd
     "Cbask_DivII_Team_Stats_XML.dtd", -- no dtd
     "Cbask_DivIII_Team_Stats_XML.dtd", -- no dtd
@@ -320,7 +320,8 @@ sportinfo_test_files =
     "test/xml/sportinfo/Cbask_All_Tourn_Teams_XML.xml",
     "test/xml/sportinfo/CBASK_AssistsXML.xml",
     "test/xml/sportinfo/Cbask_Awards_XML.xml",
-    "test/xml/sportinfo/CBASK_BlocksXML.xml"
+    "test/xml/sportinfo/CBASK_BlocksXML.xml",
+    "test/xml/sportinfo/Cbask_Conf_Standings_XML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/Cbask_Conf_Standings_XML.dtd b/test/xml/sportinfo/Cbask_Conf_Standings_XML.dtd
new file mode 100644 (file)
index 0000000..dc42e5a
--- /dev/null
@@ -0,0 +1,26 @@
+<!ELEMENT message  (XML_File_ID, heading ,  category , sport , title , Conf_Standings , 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 Conf_Standings  (Standings+ )>\r
+\r
+<!ELEMENT Standings  (Record+ )>\r
+<!ATTLIST Standings  School CDATA  #REQUIRED >\r
+<!ELEMENT Record  (Wins , Loss , Win_Percentage )>\r
+<!ATTLIST Record  Type CDATA  #REQUIRED >\r
+<!ELEMENT Wins  (#PCDATA )>\r
+\r
+<!ELEMENT Loss  (#PCDATA )>\r
+\r
+<!ELEMENT Win_Percentage  (#PCDATA )>\r
+\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/Cbask_Conf_Standings_XML.xml b/test/xml/sportinfo/Cbask_Conf_Standings_XML.xml
new file mode 100644 (file)
index 0000000..b7f13ec
--- /dev/null
@@ -0,0 +1,132 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Cbask_Conf_Standings_XML.dtd">\r
+<message>\r
+<XML_File_ID>1023917</XML_File_ID>\r
+<heading>AEL!01MAAC-STAND</heading>\r
+<category>Previews</category>\r
+<sport>CBASK</sport>\r
+<title>Metro Atlantic Athletic Conference Basketball Standings</title>\r
+<Conf_Standings>\r
+<Standings School="Marist">\r
+<Record Type="Conference">\r
+<Wins>10</Wins>\r
+<Loss>3</Loss>\r
+<Win_Percentage>.769</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>16</Wins>\r
+<Loss>6</Loss>\r
+<Win_Percentage>.727</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Manhattan">\r
+<Record Type="Conference">\r
+<Wins>9</Wins>\r
+<Loss>3</Loss>\r
+<Win_Percentage>.750</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>17</Wins>\r
+<Loss>4</Loss>\r
+<Win_Percentage>.810</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Rider">\r
+<Record Type="Conference">\r
+<Wins>9</Wins>\r
+<Loss>3</Loss>\r
+<Win_Percentage>.750</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>13</Wins>\r
+<Loss>8</Loss>\r
+<Win_Percentage>.619</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Siena">\r
+<Record Type="Conference">\r
+<Wins>8</Wins>\r
+<Loss>5</Loss>\r
+<Win_Percentage>.615</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>11</Wins>\r
+<Loss>14</Loss>\r
+<Win_Percentage>.440</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Niagara">\r
+<Record Type="Conference">\r
+<Wins>7</Wins>\r
+<Loss>5</Loss>\r
+<Win_Percentage>.583</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>11</Wins>\r
+<Loss>12</Loss>\r
+<Win_Percentage>.478</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Iona">\r
+<Record Type="Conference">\r
+<Wins>7</Wins>\r
+<Loss>7</Loss>\r
+<Win_Percentage>.500</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>10</Wins>\r
+<Loss>15</Loss>\r
+<Win_Percentage>.400</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Fairfield">\r
+<Record Type="Conference">\r
+<Wins>5</Wins>\r
+<Loss>7</Loss>\r
+<Win_Percentage>.417</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>6</Wins>\r
+<Loss>14</Loss>\r
+<Win_Percentage>.300</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Canisius">\r
+<Record Type="Conference">\r
+<Wins>3</Wins>\r
+<Loss>9</Loss>\r
+<Win_Percentage>.250</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>6</Wins>\r
+<Loss>15</Loss>\r
+<Win_Percentage>.286</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="St. Peter's">\r
+<Record Type="Conference">\r
+<Wins>3</Wins>\r
+<Loss>10</Loss>\r
+<Win_Percentage>.231</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>4</Wins>\r
+<Loss>17</Loss>\r
+<Win_Percentage>.190</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+<Standings School="Loyola-MD">\r
+<Record Type="Conference">\r
+<Wins>2</Wins>\r
+<Loss>11</Loss>\r
+<Win_Percentage>.154</Win_Percentage>\r
+</Record>\r
+<Record Type="Overall">\r
+<Wins>3</Wins>\r
+<Loss>19</Loss>\r
+<Win_Percentage>.136</Win_Percentage>\r
+</Record>\r
+</Standings>\r
+</Conf_Standings>\r
+<time_stamp> February 8, 2002, at 03:33 PM ET </time_stamp>\r
+</message>\r