Re: [xslt] HTML vs. XHTML: different output when including a file with \r\n [WAS: xmllint vs. xsltproc: different output when including a file with \r\n]



On Mon, 01 Feb 2010 14:08:02 +0100, Daniel Veillard <veillard redhat com> wrote:

[...]\r  is turned into \a or simply discarded by any XML parser.
As a result if you put \r  in an XML tree text node libxml2
*must* escape it to avoid this treatment.
This is not needed for HTML because no such rule exists for HTML parser.
If you serialize XML this is expected to be consumed by an XML parser.
If you serialize HTML this is expected to be consumed by an HTML parser.

If you ask for something to be in an XML tree then libxml2 will do
whatever is needed to have this if you reparse the serialized tree.
If a parser choke on &#13; in an XML document, it's not a compliant XML
parser the problem is on the receiving end.

  Not a bug.

Thanks for the clear answer!

Boris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]