RE: [XQuery] Error handling

> 2. Now XQuery mentions "err" namespace prefix
> (http://www.w3.org/TR/xquery/#id-basics). But this prefix is
>    not predefined like "xml", "xs", "xsi", "fn", "xdt" and 
> "local". Why?
> Does that mean that a XQuery
>    programmer has to define the "err" prefix himself to call fn:error
> function?

The "err" namespace is intended for system-detected errors, not for
user-detected errors. There's no ban on users calling error() with codes in
the "err" namespace, but it's not something I think we should encourage -
users should define their own error codes in their own namespace.

Michael Kay

Received on Thursday, 18 November 2004 12:58:52 UTC