You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Jay Burgess <jb...@digarch.com> on 2002/02/12 22:26:00 UTC
Native char, not entity representation?
When running my document through Xalan, and using output method HTML, I
need characters in the range 128-255 to be written out in their native
form, as opposed to their entity representation e.g. "£" instead of
"£". Saxon has an xsl:output attribute called
"saxon:character-representation" that allows just this behavior. Is there
a way to accomplish the same task with Xalan?
For reference, here's what the Saxon doc says about
"saxon:character-representation":
Gives the preferred representation for special characters. For
method="html" two values may be given, separated by a semicolon. The first
gives the representation for non-ASCII characters that are present in the
target character set: the values are "native", "entity", "decimal", or
"hex". The second gives the representation for characters outside the
selected encoding: the same values can be used, except for "native". For
example if encoding="iso-8859-1", then
saxon:character-representation="native;hex" causes characters in the range
0-255 to be written as themselves (except less-than, ampersand, etc which
are always written as entity references, as is non-breaking-space), and
causes characters outside this range to be written as hexadecimal character
references. By contrast "entity;decimal" causes characters in the range
160-255 to be written using HTML-defined symbolic entities, and characters
above 255 to be written in decimal. The default is "entity;decimal".
Thanks.
Jay