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%22%3E2</a:x> </doc>
but
basex:db("doc")/doc/a:x
returns
<a:x xmlns:a="http://a%22%3E1</a:x>
Cheers, Rares
I think there might be a bug in namespace resolution after an insert.
This problems seems to be related to another tracked namespace issue; I've added your observation to the following bug entry:
https://sourceforge.net/tracker/index.php?func=detail&aid=2941714&gr...
Thanks for the detailed info; expect a bug fix soon, Christian
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%22%3E2</a:x> </doc>
but
basex:db("doc")/doc/a:x
returns
<a:x xmlns:a="http://a%22%3E1</a:x>
Cheers, Rares _______________________________________________ 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