W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2004

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

From: Andrey Fomichev <fomichev@ispras.ru>
Date: Fri, 3 Sep 2004 12:06:00 +0400
To: <public-qt-comments@w3.org>
Message-ID: <KMEKJEPBHIGAGHJFMEHGIEGJCIAA.fomichev@ispras.ru>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:34 GMT