- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 18 Oct 2007 09:06:42 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5207 Summary: Accessing undefined static context base URI and XPST0001 Product: XPath / XQuery / XSLT Version: Recommendation Platform: PC OS/Version: Windows NT Status: NEW Severity: normal Priority: P2 Component: XQuery AssignedTo: chamberl@almaden.ibm.com ReportedBy: tim@cbcl.co.uk QAContact: public-qt-comments@w3.org In XQuery: http://www.w3.org/TR/xquery/#id-base-uri-decl "It is not intrinsically an error if this process fails to establish an absolute base URI; however, the base URI in the static context is then undefined, and any attempt to use its value may result in an error [err:XPST0001]." Suppose that we fail to establish an absolute base URI. Therefore the base URI in the static context is undefined. Consider how we might access this undefined value (to raise err:XPST0001). 1. fn:static-base-uri http://www.w3.org/TR/xquery-operators/#func-static-base-uri "If the Base URI property is undefined, the empty sequence is returned" 2. document node construction http://www.w3.org/TR/xquery/#id-documentConstructors "base-uri is taken from base URI in the static context. If no base URI is defined in the static context, the base-uri property is empty." 3. element node construction http://www.w3.org/TR/xquery/#id-content "Otherwise, the value of the base URI in the static context." >From my reading of the above, only (3) can cause XPST0001 to be raised since (1) and (2) both explicitly state how to handle the case where the static context base URI is undefined. Is this intentional? The difference between document and element node construction is particularly surprising.
Received on Thursday, 18 October 2007 09:06:58 UTC