OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@informatix.co.uk>
>
> >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.