>I still think this is a bug/feature in the xalan package

Sorry, but this really is correct operation.

> "Ich bin m�de"

Remember, the APIs present the Unicode text *content* of the element, not
the characters as they appear in the XML datastream. If you put ý into
the XML, the APIs will return the corresponding Unicode character; if you
put that character back into the XML using the APIs the serializer will
output it as itself (if the output encoding directly supports that
character) or as ý (if necessary).

The same is true for the ampersand character, which is why trying to put
ý into the text will *NOT* work: the APIs assume you have entered the
data content you actually want to represent in XML, and the serializer
attempts to preserve it by escaping the &.


If you want to "replace the textual content", just replace it with the new
Unicode text. Let the system worry about how that Unicode is represented if
and when it's converted back to XML syntax.

This is not a bug. It's not something you can disable. And if you stop to
think about what you're actually trying to do, it's not something you
*WANT* to disable; if you stop trying so hard to fight it, the tool can do
what you need more easily this way.

Reply via email to