I'm inserting nodes into existing documents with
xdmp:node-insert-child(). I need to put the element I'm building
within a new namespace.
I tried constructing the element two different ways.
let $taxonomy :=
<mf:taxonomy xmlns:mf="http://greenwood.com/metadata/fragment">
{ ... }
</mf:taxonomy>
and
let $taxonomy :=
element { QName("http://abc-clio.com/metadata/fragment",
"mf:taxonomy") } { ... }
The query runs fine, but when I retrieve the elements from MarkLogic,
they have the namespace prefix, but not the namespace attribute. I
see <mf:taxonomy> when I expected to see <mf:taxonomy
xmlns:mf="http://greenwood.com/metadata/fragment"> because the
namespace is not declared anywhere else in the document. It's also
how I expected it to work based on the O'Reilly XQuery book examples
I've reviewed.
What am I missing?
Thanks,
Mattio
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general