Patrick,
On 8/3/2012 4:40 AM, Szabo, Patrick (LNG-VIE) wrote:
Thank you for your very detailed answer.
I have now found the problem.
My entries looked like this:
<xsl:output-character character="ä" string="ä"/>
When I changed them to this:
<xsl:output-character character="ä" string="&#228;"/>
it worked.
You are right I am writing CDATA Sections, and I'm using
disable-output-escaping but the text that is outputted there doesn't contain
any chars outside my chosen encoding.
Now since you said Saxon should replace the chars even without a character-map
I ran the transformation without the map and it works as well...now I'm
confused.
It's confusing until you set aside the circumstances that aren't
actually relevant.
The rule is simply that if when writing a particular encoding, the
serializer encounters a character not represented in that encoding, XML
provides a handy way for it to represent the character anyway: the
numeric character reference.
This happens to be the same thing as your character map says to use,
which is why it looks the same.
But note that while Saxon will replace characters (outside the target
encoding) with numeric character references, it won't replace them with
just anything. If, for example, your character map said
<xsl:output-character character="ä" string="a-with-umlaut"/>
... you'll find that Saxon won't do that by itself (just as you'd
expect). But your character map will.
One consequence is that a convenient way to get everything outside ASCII
represented by numeric character references is to ask your processor to
serialize with encoding="us-ascii". No character map is then necessary.
I hope this helps.
Cheers, Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--