pickle_message )
import qualified TSN.XML.Scores as Scores ( dtd, pickle_message )
import qualified TSN.XML.SportInfo as SportInfo ( dtds, parse_xml )
-import qualified TSN.XML.Weather as Weather ( dtd, is_type1, pickle_message )
+import qualified TSN.XML.Weather as Weather (
+ dtd,
+ is_type1,
+ pickle_message,
+ teams_are_normal )
import Xml ( DtdName(..), parse_opts )
-- SportInfo and GameInfo appear last in the guards
| dtd == Weather.dtd =
+ -- Some of the weatherxml docs are busted in predictable ways.
+ -- We want them to "succeed" so that they're deleted.
+ -- We already know we can't parse them.
if Weather.is_type1 xml
- then go Weather.pickle_message
+ then if Weather.teams_are_normal xml
+ then go Weather.pickle_message
+ else do
+ let msg = "Teams in reverse order in weatherxml.dtd" ++
+ " (" ++ path ++ ")"
+ return $ ImportUnsupported msg
else do
- -- We want these to "succeed" so that they're deleted.
- -- We already know we can't parse them.
let msg = "Unsupported weatherxml.dtd type (" ++ path ++ ")"
return $ ImportUnsupported msg