It's there in the text view.  Thanks, Danny!

On Thu, Aug 13, 2009 at 11:20 AM, Danny
Sokolsky<[email protected]> wrote:
> Are you sure the xmlns:mf prefix binding is not in the root node of the 
> document? Or in some other ancestor node? If it is in the root node, it is 
> available to all descendants.
>
> Also, how are you displaying this in your browser?  Firefox tends to hide 
> namespace attributes when displaying as XML.  Try displaying as text.
>
> If you include a complete query that exhibits the behavior, it might help to 
> understand what you are seeing.
>
> -Danny
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Mattio Valentino
> Sent: Thursday, August 13, 2009 8:04 AM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] Namespace declaration with 
> xdmp:node-insert-child()
>
> 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
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to