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: [email protected] [mailto:[email protected]] On Behalf Of Paul M Sent: Thursday, June 17, 2010 11:40 AM To: [email protected] 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. _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
