wraxml-0.3: src/Text/HTML/WraXML/Document.hs
module Text.HTML.WraXML.Document (
XMLDoc.T(..), XMLDoc.lift, show,
) where
import qualified Text.HTML.WraXML.Tree as HTMLTree
import qualified Text.XML.WraXML.Document as XMLDoc
import qualified Text.XML.WraXML.String as XMLString
import qualified Text.XML.Basic.Name as Name
import Prelude hiding (show)
show ::
(Name.Tag name, Name.Attribute name, Ord name) =>
XMLDoc.T i name XMLString.T -> String
show (XMLDoc.Cons xml dtd trees) =
let (showHTML, showXMLDecl) =
maybe
(HTMLTree.showsMany, id)
(\xmlDecl ->
(HTMLTree.showsManyXHTML,
XMLDoc.showXMLDeclaration xmlDecl)) xml
in showXMLDecl .
maybe id XMLDoc.showDocType dtd .
showHTML trees $
""