[xslt] Unrepresentable characters in text output method



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.

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.

Thanks for your help,

jon

-- 
"Once, during Prohibition, I was forced to live for days on nothing but 
 food and water."
	- W.C. Fields


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