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

Hello Andrey,
Thanks for your comment. You are correct. I will edit the XQuery document 
to be consistent with the F&O document in its use of fn:error() in the 
next edition. 
Best regards,
--Don Chamberlin




"Andrey Fomichev" <fomichev@ispras.ru> 
Sent by: public-qt-comments-request@w3.org
09/03/2004 01:06 AM

To
<public-qt-comments@w3.org>
cc

Subject
[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 17:39:55 UTC