- | dtd == Weather.dtd = do
- let m = unpickleDoc Weather.pickle_message xml
- maybe (return $ ImportFailed errmsg) migrate_and_import m
+ | dtd == ScheduleChanges.dtd = go ScheduleChanges.pickle_message
+
+ | dtd == Scores.dtd = go Scores.pickle_message
+
+ -- SportInfo and GameInfo appear last in the guards
+ | dtd == Weather.dtd =
+ if Weather.is_type1 xml
+ then go Weather.pickle_message
+ 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