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

Re: text nodes of document in XDM

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 12 Jan 2011 00:42:36 +0000

Re:  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 
references.

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
Saxonica


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


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.