Re: A constraint on markup for EMPTY elements
At 09:00 PM 9/15/96 CDT, Paul Grosso wrote:
>At this point after reading all the "cute trick with delimiters" postings
>that attempt to address the EMPTY element, I'm tempted to say that XML
>just represent empty elements as everyone knows them in RCS 8879, and
>we just have to include the "list of empty elements" information along
>with the XML document instance.
Did we decide that the "don't worry be smart" proposal was too difficult?
This was the proposal to force parsers to keep a stack and reparent content
if the next end tag doesn't match the start tag. I would much rather add a
couple of extra hours of work to the tasks of the hundred or so people that
will implement generic XML parsers from scratch than add a couple of minutes
per document on the hundreds of thousands of documents we hope that people
will create with XML.
Note also that any application that either a) reads a DTD or b) uses a fixed
DTD will already know which elements are empty, so we are really talking
about only a subset of XML processors: primarily browsers and search tools,
not really Perl hacks and editors.
Consider also backwards-compatibility with HTML (and other DTDs). If we
require "extra" information about which tags are empty, then all existing
HTML documents are invalid XML documents because they neither include this
description-list nor point to it.
On the other hand, XML isn't the first time people have discussed this
empty=tag-recognition problem. Is "don't worry be smart" really harder to
implement than I have estimated?