Reporting empty elements

David Megginson ak117 at freenet.carleton.ca
Wed Jan 7 02:01:30 GMT 1998


Peter Murray-Rust writes:

 > There has been discussion on this and my understanding that the
 > unequivocal policy is that <TAG></TAG> and <TAG/> result in exactly
 > the same events or grove and there is NO way of distinguishing
 > which the original document contained. Some people regret this, but
 > the decision is clear.

One problem is that the PR does not fully define the information set
that an XML parser is required to return to an application (there a
few scattered rules, such as the ignorable-whitespace rule).  I'd
suggest that the difference between <TAG></TAG> and <TAG/> is lexical
rather than structural; an interface like SAX, that operates mainly on
logical structure, should not report the difference; an interface that
preserves lexical features (such as comments, internal entity
references, etc.) might provide access to the original form.


All the best,


David

-- 
David Megginson                 ak117 at freenet.carleton.ca
Microstar Software Ltd.         dmeggins at microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list