[XQuery]&[F&O] fn:error: function parameters

Hello!

According to F&O fn:error function must have the first parameter of
type xs:QName if it has any. For example, fn:error with only one
parameter has the following signature:

fn:error($error as xs:QName) as none

But '2.5.2 Handling Dynamic Errors' section of [XQuery] gives the 
following example of using fn:error

fn:error(fn:concat("Unexpected value ", fn:string($v)))

So, fn:error is called with the value of type xs:string. Sometimes, 
strings are castable to xs:QName, but it's not this case...

So, is it an error in specification?
As I think, providing function 

fn:error($error as xs:string) as none

will be quite useful for various applications of XQuery.

Best regards,
Andrey

Received on Friday, 3 September 2004 08:14:55 UTC