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

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

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Fri, 3 Sep 2004 13:39:17 -0400
To: "Andrey Fomichev" <fomichev@ispras.ru>
Cc: public-qt-comments@w3.org
Message-ID: <OF5E88F381.7087C0FB-ON88256F04.0060CF74-88256F04.0060F177@us.ibm.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:59 UTC