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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] text nodes of document in XDM

On 11/01/2011 18:19, David Lee wrote:
> Thanks very much for this explanation.
> Do you (or anyone) know why with XQuery and XSLT 2 .0 and XPath 2.0 using
> XDM as the data model instead of INFOSET, why a simple sequence isn't used
> for this purpose ?
> That is why create a document node with<xsl:variable>  when a sequence seems
> the more obvious choice (to me).

"Why" questions are always very difficult. One can attempt an 
after-the-event rationale ("this is why I think the design we ended up 
with makes sense"), but if the question is "what was the sequence of 
decisions that led to this situation, and what was each member of the 
working group thinking when they concurred with each of those 
decisions", then it becomes impossible even for a professional historian 
to untangle the convoluted process that got us to where we are today.

Firstly, the history of the data model is that XSL (as it then was) 
developed a model that was cognizant of the DOM and its strengths and 
weaknesses, and tried to do better. That was long before the Infoset. 
The Infoset was developed in full knowledge of the XSL model, and 
incorporated many of its ideas, but also added bells and whistles for 
people who (for example) wanted to retain CDATA sections and entity 

The fact that xsl:variable creates a document node was a rational choice 
for XSLT 1.0 where the tree of nodes was the only composite structure 
available. It's a less-than-ideal choice for XSLT 2.0, but was necessary 
in the interests of backwards compatibility.

> Or is there a reason, within the XDM model itself, why documents should be
> allowed to have mixed content ...
I think the language could have been made to work without this property. 
Again, if by "reason why" you are looking for a researched history of 
the actual WG decisions and their justifications, then I can't find that 
for you. It's possible (this is speculation) that the decision was 
influenced by persons unknown who felt that the rule in lexical XML that 
a document must have only one outermost element was artificial, 
unnecessary, and unlikely to appear in the final Recommendation.

Michael Kay

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS