Altova Mailing List Archives


Re: attribute order (RE: Syntax Sugar and XML information models)

From: Joe English <jenglish@---------.--->
To: xml-dev@-----.---.---
Date: 3/29/2001 5:35:00 PM
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.

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.