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 1247 - fn:id uses error err:XPTY0004 but it should use err:XPTY0006
Summary: fn:id uses error err:XPTY0004 but it should use err:XPTY0006
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 minor
Target Milestone: ---
Assignee: Ashok Malhotra
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 15:09 UTC by Alberto Massari
Modified: 2012-03-27 23:33 UTC (History)
1 user (show)

See Also:


Attachments

Description Alberto Massari 2005-04-13 15:09:25 UTC
In ยง15.5.2, fn:id reports error err:XPTY0004 "if the context item is not a
node"; but the error is defined in the appendix to be "It is a type error if,
during the static analysis phase, an expression is found to have a static type
that is not appropriate for the context in which the expression occurs, or
during the dynamic evaluation phase, the dynamic type of a value does not match
a required type as specified by the matching rules in 2.5.4 SequenceType Matching." 
As other functions (like namespace-uri, name,..) use err:XPTY0006 for the same
reason, I think it should be used also here.
Comment 1 Alberto Massari 2005-04-13 15:16:27 UTC
The same comment applies to fn:idref too
Comment 2 Michael Kay 2005-04-13 15:26:17 UTC
In fact a decision was made to merge XPTY0004 and XPTY0006 into a single error
code, because the only distinction between them was the time at which the error
is detected rather than the nature of the error. Unfortunately this decision has
not been implemented in the F+O book.

Michael Kay
Comment 3 Ashok Malhotra 2005-06-07 21:59:15 UTC
The joint WGs agreed in the telcon on 6-7-2005 to change the error for "context
item is not a node" to an F&O error.  As suggested by Jerome, this should be a
type error.  See (member-only) mail:
http://lists.w3.org/Archives/Member/w3c-xsl-query/2005May/0032.html
http://lists.w3.org/Archives/Member/w3c-xsl-query/2005May/0035.html

Ashok Malhotra
Comment 4 Michael Kay 2012-03-27 23:33:01 UTC
Changing status from the rarely-used VERIFIED to CLOSED.