Subject: Re: when to use 'as' attribute on a variable
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 8 Mar 2006 14:46:27 GMT
|
Thanks for these precisions. Which functions do you think
about (that requires argument element to live in a tree)?
Well the most noticable one is the Xpath expression / which selects
the root of the current tree if you are in one but raises an error if
not, / is root() instance of document-node() rather than (the perhaps
more natural) root().
keys are restricted to documents and temporary trees (both of which
always have a document node as root)
other edge casses involving parentless attribute nodes:
The XDM data model does not permit an attribute node with no parent
to have a typed value that includes a namespace-qualified name, that
is, a value whose type is derived from xs:QName or xs:NOTATION. This
restriction is imposed because these types rely on the namespace
nodes of a containing element to resolve namespace
prefixes. Therefore, it is an error to validate a parentless
attribute against such a type.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|