Re: [xslt] Unrepresentable characters in text output method
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Cc: Jonathan Wakely <cow compsoc man ac uk>
- Subject: Re: [xslt] Unrepresentable characters in text output method
- Date: Fri, 1 Apr 2005 11:53:16 -0500
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.
true
> 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. "Γ" 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
http://xmlsoft.org/encoding.html#extend
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
part.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]