- From: <bugzilla@jessica.w3.org>
- Date: Mon, 30 Jan 2012 12:05:34 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15791 Summary: [XQ30] XQST0054 Product: XPath / XQuery / XSLT Version: Member-only Editors Drafts Platform: PC OS/Version: Windows NT Status: NEW Severity: normal Priority: P2 Component: XQuery 3.0 AssignedTo: jonathan.robie@gmail.com ReportedBy: tim@cbcl.co.uk QAContact: public-qt-comments@w3.org In XQuery 3.0: "If the initializer of a variable V depends on V, a static error is raised [err:XQST0054]" I believe that the existance of fn:function-lookup may mean it is possible to construct a query in which a variable depends on itself, but that this cannot be determined statically. Suppose the existance of a document 'some.xml' with root element functionQName of type xs:QName with value 'local:return-v'. The following query shows how the initializer of $v might dynamically depend on $v. declare variable $v := function-lookup(doc('some.xml')/functionQName, 0)(); declare function local:return-v() { $v }; $v I suggest making this error a dynamic error, as it is in XSLT: [Definition: A circularity is said to exist if a construct such as a global variable ... is defined in terms of itself. ... ] [ERR XTDE0640] In general, a circularity in a stylesheet is a non-recoverable dynamic error. However, as with all other dynamic errors, an implementation will signal the error only if it actually executes the instructions and expressions that participate in the circularity. Because different implementations may optimize the execution of a stylesheet in different ways, it is implementation-dependent whether a particular circularity will actually be signaled. -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Monday, 30 January 2012 12:05:38 UTC