[XML-SIG] Working with non-compliant XML utilities
Martin v. Löwis
martin at v.loewis.de
Thu Dec 11 15:59:37 EST 2003
Alexandre Fayolle <Alexandre.Fayolle at logilab.fr> writes:
> This reminds me of DTD validation of EMPTY elements:
> if an element is declared EMPTY in a DTD, then it has to use the
> shortcut notation, otherwise the document is not valid.
That is not the case. In XML 1.0 (second edition), after clause 43, we
find the definitions
[Definition: An element with no content is said to be empty.] The
representation of an empty element is either a start-tag immediately
followed by an end-tag, or an empty-element tag.
So an <foo></foo> is also an empty element. After clause 44, we find
For interoperability, the empty-element tag should be used, and
should only be used, for elements which are declared EMPTY.
where "For interoperability" is defined as
for interoperability
[Definition: Marks a sentence describing a non-binding
recommendation included to increase the chances that XML documents
can be processed by the existing installed base of SGML processors
which predate the WebSGML Adaptations Annex to ISO 8879.]
So this is really "should", not "must".
Regards,
Martin
More information about the XML-SIG
mailing list