Re: Entity references in Attr values

> >See XML 1.0, 2nd ed., § 5.2:
> >"The behavior of a validating XML processor is highly predictable;
> >it must read every piece of a document and report all well-formedness
> >and validity violations. [...] For maximum reliability in interoperating
> >between different XML processors, applications which use non-validating
> >processors should not rely on any behaviors not required of such
> >processors. Applications which require facilities such as the use of
> >default attributes or internal entities which are declared in external
> >entities should use validating XML processors."
> 
> But that still doesn't say what happens when the recommendation is
> ignored and a validating processor is not used.

Take into account the meaning of "must" in the first sentence.  If a validating
processor does not read an external entity it is in error, i.e. it is in the
same state as when detecting a violation of an validity constraint, ergo the
whole document is not valid.

> That's believable. In the Infoset in this case the normalized value
> is simply unknown. That still doesn't answer the question of what DOM
> implementations should return here, though. Null perhaps?

The DOM 2 spec says about the EntityReference: "... it may be that there is no
Entity node representing the referenced entity. If such an Entity exists, then
the subtree of the EntityReference node is in general a copy of the Entity node
subtree ..."  So, if no such Entity exists (because the parser was for example
not able to provide one), there is no subtree for the EntityReference.  Note
also that it is out of the scope of least DOM 2, what exactly a parser should do
if it cannot validate a document.  

-- 
=====================================================================
 Dieter Köhler, M. A. - dieter.koehler@ppp.uni-bamberg.de
 Schiffgasse 4a, D-69117 Heidelberg, +49(0)6221-485995
 "http://www.philo.de/Philosophie-Seiten/": 1000+ Philosophie-Links
 "http://www.philo.de/VirtualLibrary/14.de.htm": Deutsche Philo-Links
 "http://www.philo.de/xml/": Open XML - XML-Komponenten für Delphi
=====================================================================

Received on Tuesday, 18 December 2001 13:03:03 UTC