[MarkLogic Dev General] in scope prefixes
Danny Sokolsky
Danny.Sokolsky at marklogic.com
Thu Jun 17 11:51:16 PDT 2010
I don't think there are any unforeseen consequences, as that namespace prefix only exists in the context of the child-elem in $test1.
-Danny
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Paul M
Sent: Thursday, June 17, 2010 11:40 AM
To: general at developer.marklogic.com
Subject: [MarkLogic Dev General] in scope prefixes
xquery version "1.0-ml";
declare namespace qqq="http://mynamespace";
let $test1 :=
<elem-a xmlns="http://mynamespace">
<child-elem xmlns:oi="http://mynamespace">ccc</child-elem>
</elem-a>
let $test2 :=
<elem-a xmlns="http://mynamespace">
<child-elem>ccc</child-elem>
</elem-a>
return (fn:in-scope-prefixes($test1/qqq:child-elem), fn:in-scope-prefixes($test2/qqq:child-elem))
When I perform a node-replace, a namespace prefix is added as shown in test 1. When I create the document, no namespace prefix is provided. What are the unforeseen consequences. XPATH still works. The oi prefix is now part of the document, so adding other elements would need different prefix.
More information about the General
mailing list