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
Dear Hans-Juergen,
yes, we are aware of some inconsistencies of the copy-namespace declarations, and the issue is still on one of our internal todo lists. Due to some secondary details, a different handling is required for main memory fragments and nodes stored in databases. It may take some time until this is fixed, so I'd just like to mention that I'll keep your mail in my mind.
Thanks for the report, Christian ___________________________
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
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de