[Home] [By Thread] [By Date] [Recent Entries]

  • From: Joe English <jenglish@f...>
  • To: xml-dev@l...
  • Date: Thu, 29 Mar 2001 19:45:12 -0800


Jonathan Borden wrote:
> Simon St.Laurent wrote:
> > Mike Champion wrote:
> > >[...]  Does anyone care about round-tripping the
> > >specific syntax used in some instance, e.g. <empty></empty> vs <empty/>?
> > >There was some discussion on SML-DEV once about using it to encode the
> > >distinction between an element with the value [empty string] vs an element
> > >with the value "null"  ... but the fact that the distinction wouldn't
> > >necessarily survive a round-trip with an InfoSet-compliant tool put that
> > >idea to rest.
> >
> > If XML 1.0 had genuinely described only a syntax, I think the distinction
> > between the two would be preserved.  Since it defined a syntax with some
> > processing notions behind it, and the Infoset people have codified those
> > notions, I think those possibilities disappeared.
> >
> From a practical point of view that possibility disappeared when the SAX
> interfaces and XPath was written.


It disappeared long before that actually.

Quoting The Handbook [*], p. 307:

     "An element has a start-tag, content, and an end-tag, but
     there are situations in which any one of those might not be there.
     [...] [T]echnically the content always exists, even if it is empty
     and loooks as if it isn't there."

and p. 590:

    "NOTE - If the element was empty, ESIS does not indicate why
    it was empty; that is, whether it was declared to be empty [...]
    or whether it just happened to contain no data characters."


If you consider a document to be a tree - which is the central
idea behind SGML - there is no difference between a leaf node
and a non-leaf node with no children.  (If you think of
documents as trees, the latter notion is almost nonsensical - 
a node with no children _is_ a leaf.)


> Is something like that really worth going
> back and changing a bunch of working code to handle this case?

Not to mention changing the core conceptual framework
on which all the code and specifications are based!



--Joe English

  jenglish@f...

[*] That's _The SGML Handbook_, copyright 1990 Charles Goldfarb.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member