Hello,

I observed a little problem concerning the interpretation of a copy-namespaces declaration. More specifically, the value no-preserve is correctly observed if the source is constructed within the query, but not if the source is read from a file. Example query:

declare copy-namespaces no-preserve, inherit;
let $in := <data xmlns:r="http://example.com"><elem/></data>
return <result>{$in/elem, doc('problem-doc.xml')//elem}</result>

where "problem-doc.xml" contains exactly the same document as the query (<data xmlns:r="http://example.com"><elem/></data>)

Output:
<result>
  <elem/>
  <elem xmlns:r="http://example.com"/>
</result>

Kind regards,
Hans-Juergen