[Bug 3653] Exception conditions for fn.string

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

           Summary: Exception conditions for fn.string
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


In section 2.3 of the specification:
fn:string() as xs:string
fn:string($arg as item()?) as xs:string

The spec says:
If no argument is supplied, the context item (.) is used as the default
argument. The behavior of the function if the argument is omitted is exactly
the same as if the context item had been passed as the argument.

However it also says:
The following errors may be raised: if the context item is undefined
[err:XPDY0002]XP; if the context item is not a node [err:XPTY0004]XP.

This should read "if the context item is not an item" in place of "if the
context item is not a node", since the context item can still be a valid
parameter for fn:string while not being a node (eg if the context item is a
sequence of xs:strings).

Received on Monday, 4 September 2006 16:48:23 UTC