Dear
All!
I'm struggling with
a problem that needs to be solve as soon as possible. Hope that
you will be
able to help me. I will attach parts of the code.
I'm doing the
following:
1. Recive a callback
with a proper XML document.
(DocumentHandler.handleDocument())
2. Use XPath to find
the element to process (DocumentHandler.translateDocument())
3. Find the text
content of this element.
(DocumentHandler.translateDocument())
4. Translate the
textual content of the element.
(OpenB2BUtil.translateString())
5. An ugly hack to
transform any characters except ASCII into numeric entities.
(OpenB2BUtil.etitifyIsoString())
6. Replace the
textual content of the element, including numeric entities
(DocumentHandler.translateDocument())
7. Serialize the
resulting DOM tree using transformers
(OpenB2BUtil.documentToStream())
Problem:
As can be seen from
the code, I replace the textual content of an element, with a string
that
contains numeric entities (ý). My problem is that the serialization
seem to translate this into (ý).
Questions:
1. Is this a bug in
xalan, from my point of view, it should leave the numeric entity in the
text payload untouched, since it is proper XML.
2. If not, is there
a way to disable this "feature" in Xalan, so that these, perfectly legal numeric
entities are let through in the serialization
3. If not, any
sugestions on how to solve the problem?
/Erik
OpenB2BUtil.java
Description: Binary data
DocumentHandler.java
Description: Binary data
