This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5236 - [XQuery] err:XPST0008 vs. err:XPST0081
Summary: [XQuery] err:XPST0008 vs. err:XPST0081
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 15:02 UTC by Tim Mills
Modified: 2008-01-09 09:25 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-10-30 15:02:56 UTC
XPST0081 is defined to be:

"It is a static error if a QName used in a query contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces."

XPST0005 is defined to be:

"It is a static error if an expression refers to an ... namespace prefix, or ... that is not defined in the static context, except for an ElementName in an ElementTest or an AttributeName in an AttributeTest."


XPST0081 seems to cover one of the cases of XPST0008 (namely undefined namespace prefixes).  I may be wrong, but I suspect XPST0008 can therefore never be thrown in that case and should be defined as:

"It is a static error if an expression refers to an element name, attribute name, schema type name, or variable name that is not defined in the static context, except for an ElementName in an ElementTest or an AttributeName in an AttributeTest."
Comment 1 Don Chamberlin 2008-01-08 19:13:09 UTC
Tim,
The Query working group discussed this bug report on 8 Jan 2008. The group observed that the XQuery specification does not in general guarantee that error conditions are not overlapping. Section 2.3.1 of the specification states "If more than one error is present, or if an error condition comes within the scope of more than one error defined in this specification, then any non-empty subset of these errors may be reported." For example, if both XPST0008 and XPST0081 apply to a given expression, then either or both of these errors may be raised.
If you accept this resolution, please mark this bug report as "Closed".
Regards,
--Don Chamberlin (for the XQuery working group)
Comment 2 Tim Mills 2008-01-09 09:25:18 UTC
OK.  I would like to suggest that in any future version of XQuery which supports some sort of try/catch mechanism, it would be nice if error conditions were non-overlapping, as this might aid interoperability.