Ah, I see.  It looks like error:name is a string, so if you want the QName to 
be resolvable, you will have to send it with your error call.  There is a 3rd 
param to fn:error that you can use to send it.

-Danny

-----Original Message-----
From: Florent Georges [mailto:[email protected]] 
Sent: Monday, August 20, 2012 10:19 AM
To: Danny Sokolsky; MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Resolving error code QName in error:error

Danny Sokolsky wrote:


  Hi Danny,

> The namespace URI is:

> http://marklogic.com/xdmp/error


  Thank you.  But that's not what I had in mind :-)  If I have the
following call to fn:error():

    fn:error(xs:QName('app:ERR1234'), 'Some error.')

if I catch it the error description will look like:

    <error:error xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd"
                 xmlns:error="http://marklogic.com/xdmp/error";
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
       <error:code>Bad bad bad</error:code>
       <error:name>app:ERR1234</error:name>
       ...

  See, the error code is there (in error:name), but there is no
binding for the namespace prefix 'app'.  Also, I wonder how to use the
xsi:schemaLocation location with a relative path, but this is probably
another story.

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to