X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FHeartbeat.hs;h=89b91adb4605a35a1b6203c0ec2d578f0488b154;hb=52632b1b0ae2421877a960e80f717a69e8a38f85;hp=4e0ba07f8b3cc15c1ae13e4e18bcb94724cf0955;hpb=1f260c118e8da5679820c8cfa489d8fe4a521140;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Heartbeat.hs b/src/TSN/XML/Heartbeat.hs index 4e0ba07..89b91ad 100644 --- a/src/TSN/XML/Heartbeat.hs +++ b/src/TSN/XML/Heartbeat.hs @@ -3,6 +3,7 @@ -- | Handle documents defined by Heartbeat.dtd. -- module TSN.XML.Heartbeat ( + dtd, verify, -- * Tests heartbeat_tests ) @@ -27,6 +28,11 @@ import TSN.DbImport ( ImportResult(..) ) 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. -- @@ -63,7 +69,7 @@ verify :: XmlTree -> IO ImportResult 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." -- @@ -81,7 +87,7 @@ heartbeat_tests = -- | If we unpickle something and then pickle it, we should wind up --- with the same thing we started with. WARNING: succeess of this +-- with the same thing we started with. WARNING: success of this -- test does not mean that unpickling succeeded. -- test_pickle_of_unpickle_is_identity :: TestTree