Re: [XQuery] Reference to error XP0050 (editorial)

Hi Priscilla,

This is an official response from the W3C XML Query Working Group. It 
covers the following message that you submitted:

http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/0085.html

The error [err:XP0050] is used for consistency with treat as.
Indeed, as the paragraph in Section 3.2 indicates:

A "/" at the beginning of a path expression is an abbreviation for the 
initial step fn:root(self::node()) treat as document-node() (this is true 
even if the "/" is the entire path expression). The effect of this initial 
step is to begin the path at the root node of the tree that contains the 
context node. If the context item is not a node, a type error is raised.[
err:XP0020] At evaluation time, if the root node above the context node is 
not a document node, a dynamic error is raised.[err:XP0050]

the expression '/' is an abbreviation for 'fn:root(self::node()) treat as 
document-node()'.
In case the root node above the context node is not a document node, the 
'treat as document-node()'
expression will raise a dynamic error [err:XP0050]. This is the reason why 
this error
number is used.

Thanks,

Jerome

On behalf of the W3C XML Query Working Group

Received on Tuesday, 24 August 2004 23:19:03 UTC