]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add SportInfo support for Minor_Baseball_Transactions_XML.dtd.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 17 Jun 2014 12:21:30 +0000 (08:21 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 17 Jun 2014 12:21:30 +0000 (08:21 -0400)
doc/man1/htsn-import.1
schema/Minor_Baseball_Transactions_XML.dtd [new file with mode: 0644]
schemagen/Minor_Baseball_Transactions_XML/Minor_Baseball_Transactions_XML.xml [new file with mode: 0644]
src/TSN/XML/SportInfo.hs
test/xml/sportinfo/Minor_Baseball_Transactions_XML.dtd [new file with mode: 0644]
test/xml/sportinfo/Minor_Baseball_Transactions_XML.xml [new file with mode: 0644]

index 95742b64c0a110cc331085288e60817ded33e0d0..a9a2f3c2f2bf8f522f9821c3b65cdc0b85ea52ca 100644 (file)
@@ -174,6 +174,8 @@ minorscoresxml.dtd
 Minor_Baseball_League_Leaders_XML.dtd
 .IP \[bu]
 Minor_Baseball_Standings_XML.dtd
+.IP \[bu]
+Minor_Baseball_Transactions_XML.dtd
 .RE
 .P
 The GameInfo and SportInfo types do not have their own top-level
diff --git a/schema/Minor_Baseball_Transactions_XML.dtd b/schema/Minor_Baseball_Transactions_XML.dtd
new file mode 100644 (file)
index 0000000..276193c
--- /dev/null
@@ -0,0 +1,22 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title ,Date, Transactions , 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 Date  (#PCDATA )>\r
+\r
+<!ELEMENT Transactions  (Tr_Listing+ )>\r
+\r
+<!ELEMENT Tr_Listing  (Listing+ )>\r
+<!ATTLIST Tr_Listing  Sport CDATA  #REQUIRED >\r
+<!ELEMENT Listing  (#PCDATA )>\r
+<!ATTLIST Listing  L_Title CDATA  #REQUIRED >\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/schemagen/Minor_Baseball_Transactions_XML/Minor_Baseball_Transactions_XML.xml b/schemagen/Minor_Baseball_Transactions_XML/Minor_Baseball_Transactions_XML.xml
new file mode 100644 (file)
index 0000000..d79ad18
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Minor_Baseball_Transactions_XML.dtd">\r
+<message>\r
+<XML_File_ID>236532</XML_File_ID>\r
+<heading>BQC;FATES-FORTUNES</heading>\r
+<category>Fates_N_Fortunes</category>\r
+<sport>MINORBASE</sport>\r
+<title>\r
+Minor League Baseball Transactions from The Sports Network\r
+</title>\r
+<Date>Wednesday, March 3, 2004</Date>\r
+<Transactions>\r
+<Tr_Listing Sport="MEXICAN LEAGUE">\r
+<Listing L_Title="Aguascalientes">\r
+Traded INF Alfredo Perez, C Antonio Ortega and OF Uriel Valdez\r
+to Cancun for OF Fernando Villegas, P Mauricio Avila, INF Roberto Macias and C\r
+Jesus Gavia.\r
+</Listing>\r
+<Listing L_Title="Cancun">\r
+Signed P Luis C. Garza and INF Fidel Garza; Released C Jesus Abrego, P\r
+Martin Hernandez, P German Jimenez, P Rafael Manzano, P Abel Sierra, P Fernando\r
+Soto, P Noe Villalobos, INF Rafael Zamudio; Traded INF Francisco Cervera to\r
+Yucatan.\r
+</Listing>\r
+<Listing L_Title="Laguna">\r
+Traded INF Jorge L. Valle to Cancun for INF Abel Martinez.\r
+</Listing>\r
+<Listing L_Title="Monterrey">\r
+Traded INF Ever Magallanes and P Jose C. Rubio to San Luis Potosi\r
+for INF Miguel Flores.\r
+</Listing>\r
+<Listing L_Title="San Luis Potosi">\r
+Annouced the retirement of C Ventura Cisneros; released Jose\r
+R. Medina and Saul Valenzuela.\r
+</Listing>\r
+<Listing L_Title="Tabasco">\r
+Released INF Rayner Laya; signed OF Donzell McDonald; Traded P\r
+Conrado Garza to Cancun to P Roberto Pimentel.\r
+</Listing>\r
+<Listing L_Title="Yucatan">\r
+Traded OF Alonso Tellez to Cancun, who then traded Tellez to\r
+Aguascalientes.\r
+</Listing>\r
+</Tr_Listing>\r
+</Transactions>\r
+<time_stamp> March 9, 2004, at 03:52 PM ET </time_stamp>\r
+</message>\r
index 3b05bdeb978409dfc7bacf879d5e37777fc3b5b3..232d3f4225b3195d712813b4d77c429a6bc87665 100644 (file)
@@ -104,7 +104,7 @@ dtds =
     "minorscoresxml.dtd",
     "Minor_Baseball_League_Leaders_XML.dtd",
     "Minor_Baseball_Standings_XML.dtd",
-    "Minor_Baseball_Transactions_XML.dtd", -- no dtd
+    "Minor_Baseball_Transactions_XML.dtd",
     "mlbbattingavgxml.dtd", -- no dtd
     "mlbdoublesleadersxml.dtd", -- no dtd
     "MLBGamesPlayedXML.dtd", -- no dtd
@@ -348,7 +348,8 @@ sport_info_test_files =
     "LeagueScheduleXML.xml",
     "minorscoresxml.xml",
     "Minor_Baseball_League_Leaders_XML.xml",
-    "Minor_Baseball_Standings_XML.xml"
+    "Minor_Baseball_Standings_XML.xml",
+    "Minor_Baseball_Transactions_XML.xml"
   ]
 
 
diff --git a/test/xml/sportinfo/Minor_Baseball_Transactions_XML.dtd b/test/xml/sportinfo/Minor_Baseball_Transactions_XML.dtd
new file mode 100644 (file)
index 0000000..276193c
--- /dev/null
@@ -0,0 +1,22 @@
+<!ELEMENT message  (XML_File_ID, heading , category , sport , title ,Date, Transactions , 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 Date  (#PCDATA )>\r
+\r
+<!ELEMENT Transactions  (Tr_Listing+ )>\r
+\r
+<!ELEMENT Tr_Listing  (Listing+ )>\r
+<!ATTLIST Tr_Listing  Sport CDATA  #REQUIRED >\r
+<!ELEMENT Listing  (#PCDATA )>\r
+<!ATTLIST Listing  L_Title CDATA  #REQUIRED >\r
+<!ELEMENT time_stamp  (#PCDATA )>\r
+\r
diff --git a/test/xml/sportinfo/Minor_Baseball_Transactions_XML.xml b/test/xml/sportinfo/Minor_Baseball_Transactions_XML.xml
new file mode 100644 (file)
index 0000000..d79ad18
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" standalone="no" ?>\r
+<!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN" "Minor_Baseball_Transactions_XML.dtd">\r
+<message>\r
+<XML_File_ID>236532</XML_File_ID>\r
+<heading>BQC;FATES-FORTUNES</heading>\r
+<category>Fates_N_Fortunes</category>\r
+<sport>MINORBASE</sport>\r
+<title>\r
+Minor League Baseball Transactions from The Sports Network\r
+</title>\r
+<Date>Wednesday, March 3, 2004</Date>\r
+<Transactions>\r
+<Tr_Listing Sport="MEXICAN LEAGUE">\r
+<Listing L_Title="Aguascalientes">\r
+Traded INF Alfredo Perez, C Antonio Ortega and OF Uriel Valdez\r
+to Cancun for OF Fernando Villegas, P Mauricio Avila, INF Roberto Macias and C\r
+Jesus Gavia.\r
+</Listing>\r
+<Listing L_Title="Cancun">\r
+Signed P Luis C. Garza and INF Fidel Garza; Released C Jesus Abrego, P\r
+Martin Hernandez, P German Jimenez, P Rafael Manzano, P Abel Sierra, P Fernando\r
+Soto, P Noe Villalobos, INF Rafael Zamudio; Traded INF Francisco Cervera to\r
+Yucatan.\r
+</Listing>\r
+<Listing L_Title="Laguna">\r
+Traded INF Jorge L. Valle to Cancun for INF Abel Martinez.\r
+</Listing>\r
+<Listing L_Title="Monterrey">\r
+Traded INF Ever Magallanes and P Jose C. Rubio to San Luis Potosi\r
+for INF Miguel Flores.\r
+</Listing>\r
+<Listing L_Title="San Luis Potosi">\r
+Annouced the retirement of C Ventura Cisneros; released Jose\r
+R. Medina and Saul Valenzuela.\r
+</Listing>\r
+<Listing L_Title="Tabasco">\r
+Released INF Rayner Laya; signed OF Donzell McDonald; Traded P\r
+Conrado Garza to Cancun to P Roberto Pimentel.\r
+</Listing>\r
+<Listing L_Title="Yucatan">\r
+Traded OF Alonso Tellez to Cancun, who then traded Tellez to\r
+Aguascalientes.\r
+</Listing>\r
+</Tr_Listing>\r
+</Transactions>\r
+<time_stamp> March 9, 2004, at 03:52 PM ET </time_stamp>\r
+</message>\r