[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Carlisle <davidc@n...>
  • To: David Lee <dlee@c...>
  • Date: Tue, 11 Jan 2011 22:05:24 +0000

On 11/01/2011 20:22, David Lee wrote:
> When is a document node created implicitly ?
>
> If I run the xquery
> 	1,"hi",<foo/>
>
> I do NOT get a document node.
>
>

step 7 of

http://www.w3.org/TR/xslt-xquery-serialization/#serdm

so if you use some API that gives direct access to the XD< sequences 
there is no implicit parent, but if (as is the specified default for 
xslt and not uncommon for xquery) the result is returned using the xml 
serialisation then an implict document node is produced.

there is an xsl:document in xslt to generate a document node explicitly 
but it is almost never used (and xslt 1 didn't have such a construct at all)

node copying in both xquery and xslt is designed to silently throw away 
these document node containers, if you copy a document node into another 
document element, it isn't an error you simply get the document nodes 
children.

David



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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member