Re: [xslt] Unrepresentable characters in text output method

On Tue, Mar 29, 2005 at 10:25:22AM +0100, Jonathan Wakely wrote:
> Apologies if this is documented somewhere or has been discussed on this
> list before, I couldn't find it.
> My reading of 16.3 in the XSLT TR implies that applying a stylesheet
> with <xsl:output method='text encoding='ASCII'/> should produce an
> error if the output contains non-ASCII characters.


> Section 8 of the "XSLT 2.0 and XQuery 1.0 Serialization" TR is stricter
> and says an error must be signalled.

  irrelevant to libxml2/libxslt 

> Libxslt seems to output the non-ASCII characters as entities (even
> though that's possibly/probably not valid for text output.)  For my
> present purposes that behaviour is ideal, since I want to produce RTF
> and can post-process the output to turn e.g. "&#915;" into "\\u915 ",
> so I'd like to know if I can rely on the libxslt behaviour staying the
> same for XSLT 1.0, or if I should expect it to change in the future.

  it looks like a bug to me, so that behaviour may break if that bug is fixed.
However if you read
 you will see it is possible for you to define your own handling routines
for ascii encoding at the libxml2 level, overriding the default ones coming
from the library, Use that if you want to be sure of the behaviour of that


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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