Miguel Mitrofanov a écrit :
Thank you for investingating this : that made me realize that the issue comes from the a_indent option. What is strange is that this does not seems to appear with your exampleSeems rather strange for me, I've just installed HXT and got this:Prelude Text.XML.HXT.Arrow> runX $ readString [(a_validate,"0")] "<this> </this>" >>> writeDocumentToString [] ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<this> </this>"]Everything works fine except for the fact that all the nodes <this> </this> (that is, a space (an XML text node whose contents are a single space character)within a <this> element node) get transformed to a <this/> element node,
runX $ readString [(a_validate,"0")] "<this> </this>" >>> writeDocumentToString [(a_indent, v_1)]
["<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<this>\n</this>\n"]But if I try the same with my XML file, my empty nodes are "folded". I suppose this comes from the "Ctrl-M" at the end of the lines.
See the attached file and you may see thatrunX $ readDocument [(a_validate, v_0)] "ftest.5.11e.xdp" >>> writeDocumentToString []
produces « <text> </text> » nodes (OK), butrunX $ readDocument [(a_validate, v_0)] "ftest.5.11e.xdp" >>> writeDocumentToString [(a_indent, v_1)]
produces « <text/> » nodes (bad). I can manage it without the a_indent option. Thanks/спасибо Fernand
ftest.5.11e.xdp
Description: application/vnd.adobe.xdp
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
