Problem with copy-namespaces declaration

Thursday, 31 May 2012 · 2 messages
HR
Hans-Juergen Rennau31 May 2012 01:10 #
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
CG
Christian Grün31 May 2012 01:47 #
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
Quoted text · Hans-Juergen Rennau · 26 lines
> 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 at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery