This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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).
>This should read "if the context item is not an item" No: the context item, if it exists at all, is always an item. The phrase "if the context item is not a node [err:XPTY0004]XP." should simply be deleted.
The XSL and XML Query WGs considered this issue at their Sept. 12 meeting. The WGs agree with the resolution that Michael Kay proposed above: "The phrase "if the context item is not a node [err:XPTY0004]XP." should simply be deleted." Please close this bug report if you agree with our resolution.
Thanks.