Kbase P115042: XML entities are not expanded in enclosing text node of DOM tree
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1E
OpenEdge 10.x
SYMPTOM(s):
DTD specifies text entities
Entity appears in text of XML document
DOM parsing generates multiple text nodes instead of one
Only one text node was generated in Progress 9.1D and previous versions
CAUSE:
The XML parsing engine (Xerces-C) used by Progress has evolved between Progress 9.1D and later versions. The new version (2.x) will output EntityReference nodes in the DOM tree by default, whereas the previous version (1.x) included the translation of the entity directly in the enclosing Text node. Both behaviors are acceptable according to the DOM Core standard.
FIX:
This is a known issue being investigated by Development.
There are two workarounds for this issue:
- the DOM tree can be manually normalized in 4GL, by collapsing the Text sub-node(s) of the EntityReference nodes into the enclosing Text nodes. The NORMALIZE() method will not work for this purpose.
- use SAX parsing instead of DOM, and ignoring EntityReference nodes when grouping the Text nodes together to create character strings.