On Mon, Aug 07, 2006 at 11:42:29PM +0200, Arjan Oosting <[EMAIL PROTECTED]> was heard to say: > module Main where > > import Text.PrettyPrint > import Text.XML.HaXml.Combinators > import Text.XML.HaXml.Html.Generate > import Text.XML.HaXml.Pretty > import Text.XML.HaXml.Types > import Text.XML.HaXml.Escape > > doc :: CFilter > doc = html [ > htitle [ > literal "What's wrong with HaXML" > ], > replaceAttrs [("class", "the \"best>"), ("bgcolor", "blue")] `o` > hbody [ > literal "<i>XML is a structured container > format, not a random byte sequence." > ] > ] > > escaper :: Content -> Content > escaper (CElem e) = CElem (xmlEscape stdXmlEscaper e) > escaper x = x > > main :: IO () > main = print $ vcat $ map content $ map escaper $ doc undefined
I've had a chance to test this, and it appears that it is still not possible to do what I'd like. The above code, for instance, produces the following HTML for the last literal tag: <body class="the "best>" bgcolor="blue" >< i > XML is a structured container format, not a random byte sequence.</body> This results in whitespace between the brackets and the i; I would normally expect the following output instead: <body class="the "best>" bgcolor="blue" ><i> XML is a structured container format, not a random byte sequence.</body> This has particularly bad effects in a <pre> tag. The fragment 'pre [literal "Daniel Burrows <[EMAIL PROTECTED]>"]' produces the following output: <pre > Daniel Burrows < [EMAIL PROTECTED] > </pre> which renders the brackets on separate lines from the email address! Daniel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]