[Bug 1247] New: fn:id uses error err:XPTY0004 but it should use err:XPTY0006

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1247

           Summary: fn:id uses error err:XPTY0004 but it should use
                    err:XPTY0006
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: amassari@progress.com
         QAContact: public-qt-comments@w3.org


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.

Received on Wednesday, 13 April 2005 15:09:27 UTC