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]
- From: "Boris Schaeling" <boris highscore de>
- To: xslt gnome org
- Cc: xml gnome org
- Subject: 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]
- Date: Thu, 28 Jan 2010 13:14:35 +0100
On Mon, 25 Jan 2010 12:59:56 +0100, Boris Schaeling <boris highscore de>
wrote:
On Sun, 24 Jan 2010 23:20:42 +0100, Nick Wellnhofer <wellnhofer aevum de>
wrote:
[...]It seems that the default behavior of libxml is to encode "\r" as
" ". But there is an exception for HTML in
xmlEncodeEntitiesReentrant in entities.c. I haven't checked, but looking
This would confirm our assumption that it's libxml which treats \r
differently depending on the output format.
at the source the XHTML serialization code seems to call
xmlEscapeContent in xmlIO.c. There's also xmlEscapeEntities in
xmlsave.c but that uses hex char refs. Those two functions don't make
an exception for XHTML content.
Personally, I think libxml shouldn't escape "\r" at all.
As one function distinguishes between HTML and XHTML and the others
escape \r I wonder what the use cases looked like. So far it would also
make more sense to me if \r is not escaped for XHTML (at least one
popular reading system for ePub files - which contain XHTML files -
shows a question mark for entities).
I filed now a bug report: https://bugzilla.gnome.org/show_bug.cgi?id=608333
Boris
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]