[MarkLogic Dev General] Resolving error code QName in error:error

Florent Georges lists at fgeorges.org
Mon Aug 20 10:19:11 PDT 2012


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/


More information about the General mailing list