[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Syntax Sugar and XML information models

  • From: "W. E. Perry" <wperry@f...>
  • To: XML DEV <xml-dev@l...>
  • Date: Thu, 29 Mar 2001 08:37:09 -0500

Re: Syntax Sugar and XML information models
Among the components of XML documents there are entanglements not fully
described by the XML 1.0 Recommendation which are nonetheless intuitively
understood and expected by human users. IMO these are ultimately the result of
document order, which is, of course, an inescapable property of documents. The
interaction of these components is most clearly seen in Element-Element,
Attribute-Element and Attribute-Attribute relationships, and in all such cases
the principal and simplest nexus is the lexical contiguity of document order.
That lexical contiguity can produce semantic outcomes which neither the creator
nor user of a document expected, but which both of them will usually acknowledge
are inevitable once they have seem them demonstrated. An example is on this
morning's xsl list:

Michael Kay wrote:

> > Can XML/XSL have the notion of inheritance?
>
> No, it doesn't. If you were using attributes rather than elements you could
> achieve something along the right lines with a template rule such as
>
> <xsl:template match="person">
> <person>
>   <xsl:copy-of select="person[@id=1]/@*"/>
>   <xsl:copy-of select="@*"/>
> </person>
> </xsl:template>
>
> This relies on the fact that when outputting attributes, the last attribute
> with a given name overrides earlier attributes with the same name.
>
> You're not using attributes, but you could convert the elements to
> attributes in a pre-pass. The alternative is a lot of <xsl:choose> logic.
>
> Mike Kay
> Software AG

The point is that there is processing which, for reasons of its own, must build
explicit rules, and thereby derive specific semantics, from the otherwise
unspoken implications of document order. If such an application expects XML as
its input, then it may reasonably expect in that input any of the inherent
properties of XML, however negligible some of those properties may have seemed
to a document creator. IMHO the only way to insure that implicit properties of
XML syntax are available to applications expecting XML input is to present XML
syntax.

Respectfully,

Walter Perry

Rick Jelliffe wrote:

> From: John Aldridge <john.aldridge@i...>
>
> >At 21:13 28/03/2001 -0500, Michael Champion wrote:
> >>So, does ANYBODY care about round-tripping a) the specific quote
> characters
> >>around attribute values, b) the order of attributes; c) character entity
> >>references for characters that are in the specified character set d) the
> two
> >>diferent syntaxes for empty elements, .... ?
> >
> >Yes, but only sometimes.  I _do_ mind if editors unpredictably change these
> >things, because I'm going to store XML data in RCS, and expect rcsdiff,
> >rcsmerge & the like to do sensible things.
>
> But that means you are *not* interested in the information set of the
> document, but the actual text of the document's entities. That is a fine
> thing.  Let there be element-based (infoset) editors and entity-based
> (tag-aware) editors.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.