- From: Dieter Köhler <dieter.koehler@ppp.uni-bamberg.de>
- Date: Fri, 06 Jul 2001 18:18:22 +0200
- To: xml-editor@w3.org
The sentence in E15 which states: "The declaration matches EMPTY and the element has no content (not even entity references, comments, PIs or white space)." should be replaced by: "The declaration matches EMPTY and the element has (after replacing any entity references with their replacement text) no content (not even comments, PIs or white space)." Reason: The original wording requires extraordinarily complicated validity checks: While validity checks for the other contentspec types can be performed after resolving all entity references, this is not be possible for elements declared EMPTY, because entity references of the from <!ENTITY foo ""> would go through unnoticed: ... <!ENTITY foo ""> <!ELEMENT empty EMPTY > ... <empty>&foo;</empty> This is even worse, since if testing for entity references makes sense in the above example, there is no reason, why it should not make sense for recursively defined entity declarations such as: ... <!ENTITY foo ""> <!ENTITY bar "<empty>&foo;</empty>"> <!ENTITY doc "<doc>&bar;</doc>"> <!ELEMENT empty EMPTY > ... &doc; "&doc;" can only be validated correctly if an XML processor keeps track of every entity reference resolve operation during analyzing the DTD. This would disallow simple parser strategies such as e.g. mentioned in XML spec App. D, where "the XML processor will recognize the character references when it parses the entity declaration, and resolve them before storing the ... string as the value of the entity ...", because if the parser stores the string for "bar" which is "<empty></empty>" it will pass the validity check, though it was defined as "<empty>&foo;</empty>". -- ===================================================================== Dieter Köhler, M. A. - dieter.koehler@ppp.uni-bamberg.de Mittlere Kaulberg 22, D-96049 Bamberg, +49(0)951-5190726 "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 Friday, 6 July 2001 12:20:48 UTC