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

Thank you.

My goals are not so much historical archeology ... but rather to try to
understand the intent, and current use, in the hopes of being able to make
an informed decision as to what features to "support" in an XDM model,
and which I could argue (to myself if not others) needn't be supported
except as a legacy concession (or at all).

By "support" I know that is vague, but I don't have a better word yet. 
I'm trying to reanimate my thinking and work on an XDM Serialization
specification which is usable for data exchange.
So for example if I serialize to a stream (or file)   

    document {  1 , "hi" , <foo/> , 2 } 

then then deserialize that back into XDM values ... how "important" is it to
reconstruct the sequence inside the document.
Again I know that is vague, as who can judge "importance" ... but alas a
judgment call may need to be made. 

In my personal case, its not important at all to me because I would never
(knowingly) construct such a node.   And in fact it came as a great surprise
that XDM supported it.
(learn something new every day !) 

So I'm trying to figure out to what an extent fidelity of data exchange is
really needed in this case or is it primarily academic, and how much effort
to put into handling it.

David A. Lee

-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com] 
Sent: Tuesday, January 11, 2011 7:43 PM
To: xml-dev@lists.xml.org
Subject: 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
> 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


XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[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