It seems there is a bug with the XQueryTool version 126.96.36.199.
I execute a query that insertes 2 nodes and the result is that 4 nodes were inserted. I executed the same query with the XQueryTool version 188.8.131.52 and it works fine, only 2 nodes were inserted.
I am sure that the query functions.
I have attached the query.
insert query OK.txt (791 Bytes)