Hi Igor,
this seems more a documentation problem; the text in the original W3C specs says (see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/DOM3-Core.html#core-parameter-entities)|
|

"entities"

   true
       [required] (default)
       Keep EntityReference nodes in the document.
   false
       [required]
       Remove all EntityReference nodes from the document, putting the
       entity expansions directly in their place. Text nodes are
       normalized, as defined in Node.normalize. Only unexpanded entity
       references are kept in the document.

The "unexpanded entity references" is a link for http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.rse where it specifies

"A unexpanded entity reference information item serves as a placeholder by which an XML processor can indicate that it has not expanded an external parsed entity. There is such an information item for each unexpanded reference to an external general entity within the content of an element. A validating XML processor, or a non-validating processor that reads all external general entities, will never generate unexpanded entity reference information items for a valid document."

So such an entity reference should appear only if Xerces decides not to load an external entity, but it doesn't have such a feature; if instead the XML uses an entity that is not defined altogether, that is an error that you should see reported in the ErrorHandler (if validation is enabled).

Alberto

Igor Ignatyuk wrote:
Yes, but entity reference nodes to undefined entities should be kept in the
document in both case, if "entities" is set to "true" and if it is set to
"false". (See the excerpt from the documentation in my first message.)

Reply via email to