Re: A constraint on markup for EMPTY elements

> Date: Sat, 14 Sep 1996 23:40:58 -0700
> From: Tim Bray <tbray@textuality.com>

> 
> Taken at another level, more crassly sociological, XML has a greater chance
> of widespread adoption if it doesn't "look weird" to the world's several
> million HTML hacks.
> 
> Someone, please, explain why this fear is unfounded.  Because I would
> really like to have a syntactically-obvious EMPTY element in XML.  Or
> (serious question) is invading HTML's turf a non-goal of XML?

I don't think it's unfounded at all.

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.

If someone wants to have a corpus of XML data that can be parsed without
reference to a DTD, then they can create a tag set that has no empty
elements.  When the receiving system notices there is no "list of empty
elements," it'll know there are no empty elements.  But if someone has
a tag set that includes empty elements and they wish to use XML to represent
those document instances and interchange them without the DTD, then they
have to include the "list of empty elements" information with it.


> From: Charles@sgmlsource.com (Charles F. Goldfarb)
> Date: Sun, 15 Sep 1996 08:49:09 GMT
> 
> We don't need to declare EMPTY elements. We can just declare (#pcdata) and use
> explicit end-tags in the instance. We lose the ability to validate emptiness,
> but that is minor compared to the benefit of simplifying DTD-less instance
> parsing without introducing syntactic constructs that would be unfamiliar to
> HTML users.
> 
> <p><pe>This is before an image.</pe><img ...></img>
> <pe>This is after an image.</pe></p>

Understood, but <img ...></img> isn't valid HTML and--given the HTML 
DTD--isn't valid SGML either.  If someone develops an XML tag set and 
corpus of document instances using the markup you show (i.e., where IMG 
is not an empty element), then that's fine.  But to say that in XML 
there can be no such things as empty elements will mean the XML cannot
be used for practically all existing wide-spread SGML applications.
I realize this is not listed as a design goal, but it has to be a
marketing consideration.

paul

Received on Sunday, 15 September 1996 22:22:02 UTC