The 'xs' prefix is predefined for XQuery, but this is an error coming from
the parsing of XML. XML does not predefine any namespaces. So your
fix is to provide the binding on the XML content (and one for xsi as well).
When you say you cannot add the proper namespace bindings for the
element, do you mean that this XML was created with XQuery and you
don't know how to get the right set of bindings in place?
If you use direct constructors, you can just do it:
<File xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
You can force the issue for sure by wrapping the computed constructor
in a dummy direct constructor:
<dummy xmlns:xs="http://www.w3.org/2001/XMLSchema">{
element File { attribute xsi:type {"xs:base64Binary"} }
}</dummy>/*
//Mary
On Wed, 26 Aug 2009 00:10:58 -0700, Tim Frosh <[email protected]> wrote:
Hi,
When I try to get the xml data using xdmp:get-request-body, I am
getting the following error:
XDMP-DOCNONSBIND: xdmp:get-request-body("xml") -- No namespace binding
for prefix xs
The xml data looks like this:
<File>
<Content xsi:type="xs:base64Binary"></Content>
</File>
I expected that xs prefix is one of default namespaces and I don't have
to include it.
If I add that namespace like this
<File xmlns:xs="http://www.w3.org/2001/XMLSchema">
the error disappears, but I am not able to do that with computed element
constructors, because namespace keyword is not working.
At least I couldn't figure out how to do that.
What are the possible solutions for this scenario?
Thanks in advance
Tim
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general