Next in thread →
Next in month →
Re: Should empty elements allow whitespace?
James Clark scripsit: > SGML with WWW amendment doesn't allow anything in an empty element (not > whitespace, not entity references, not comments). The XML 1.0 spec > isn't very clear on this, but in the past the policy has been to > maintain compatibility with SGML with respect to validity. Speaking as a member of the XML Core WG, but *not* officially for it: 1) The WG believes that the XML rule is the same as the SGML one; 2) The use of the phrase "The declaration matches EMPTY and the element has no content" in the Element Valid VC, combined with the definition of "content", implies this; 3) The WG will almost certainly (IMO) issue an erratum in the next week or so, adding the phrase "(not even comments, PIs or white space)" to the above sentence. > Being compatible with SGML/XML in this area would imply that TREX would > not allow PIs and comments and entity references in an empty elements. > I believe that would be fundamentally wrong: validation behaviour should > not as a matter of principle be affected by comments or entity > structure. I would agree with this, provided the term "empty" (which has a definite SGML/XML meaning) were replaced with some other term such as "none". > (It would also make it impossible to implement using just > the standard SAX 2 interfaces, since these don't report internal entity > references.) That would be relevant only in the corner case of an entity containing only whitespace/comments or nothing at all. A reference to any other sort of entity would clearly be incompatible with "empty" or "none". -- John Cowan One art/there is/no less/no more/All things/to do/with sparks/galore --Douglas Hofstadter
Next in thread →
Next in month →