Hi all,
I just come across an issue, and I am not sure if I am too stupid to see the mistake, or it is a bug in BaseX.
I need to create an XML document from data in BaseX 11.5 inside basexgui. The data in the database does not use any namespaces. The document I am creating must have a default namespace set. Here is a stripped down example of my XQuery:
Strangely all XPaths inside and outside the gpx-element will not match anything as long as I have the default namespace on the gpx-element defined. It works if I drop the xmlns attribute or I define the namespace explicitly, like:
Even though this should be semantically equal to the output of the above, the third party app that I import this to does not recognize it as such.
This is puzzling me mainly because I do not see, why the namespace I define for the *output* xml should have an impact on the queries that are directed to my database. As a workaround I will probably use a regex to remove the namespace, but that's obviously pretty awkward.
Any ideas?
Cheers
Jörn