W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2004

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

From: Jerome Simeon <simeon@us.ibm.com>
Date: Tue, 24 Aug 2004 19:18:21 -0400
To: public-qt-comments@w3.org, Priscilla Walmsley <priscilla@walmsley.com>
Message-ID: <OFDB1B555C.57E763C7-ON85256EFA.007F5BBF-85256EFA.00800277@us.ibm.com>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:21 UTC