4 Feb
2010
4 Feb
'10
1:12 a.m.
Hello, I think there might be a bug in namespace resolution after an insert. I have two xml files: doc.xml <?xml version="1.0" encoding="UTF-8"?> <doc xmlns:a="http://a"> <a:x>1</a:x> </doc> doc2.xml <?xml version="1.0" encoding="UTF-8"?> <r xmlns="http://b" xmlns:a="http://a"> <a:x>2</a:x> </r> I create database "doc" from "doc.xml". Then, I preform the following insert query: declare namespace a = "http://a"; declare namespace b = "http://b"; insert nodes doc("doc2.xml")/b:r/a:x into basex:db("doc")/doc and the result is: <doc xmlns:a="http://a"> <a:x>1</a:x> <a:x xmlns="http://b">2</a:x> </doc> but basex:db("doc")/doc/a:x returns <a:x xmlns:a="http://a">1</a:x> Cheers, Rares