-- | Handle documents defined by Heartbeat.dtd.
--
module TSN.XML.Heartbeat (
+ dtd,
verify,
-- * Tests
heartbeat_tests )
import Xml ( pickle_unpickle, unpickleable )
+-- | The DTD to which this module corresponds.
+--
+dtd :: String
+dtd = "Heartbeat.dtd"
+
-- | The data structure that holds the XML representation of a
-- Heartbeat message.
--
verify xml = do
let root_element = unpickleDoc pickle_message xml
return $ case root_element of
- Nothing -> ImportFailed "Could not unpickle document in import_generic."
+ Nothing -> ImportFailed "Could not unpickle document to be verified."
Just _ -> ImportSkipped "Heartbeat received. Thump."
--