I'am accessing BaseX 6.5.1 through the XMLDB API. There are some issues with namespace handling when storing resources. Let me clarify that with some examples.
First example
I want to store the following as a resource:
String example = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
"</tag>";
Second example
I want to store the following as a resource and INTPARSE = false:
String example = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
"</tns:tag>";
This yields the following exception:
org.xmldb.api.base.XMLDBException: "null" (Line 1): The prefix "tns" for element "tns:tag" is not bound
Third example
I want to store the following as a resource and INTPARSE = true:
String example = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
"</tns:tag>";
This yields <tns:tag xmlnstns="
http://example.org"/> in the GUI. The colon is missing in ' xmlnstns' . So this is not OK.
Are the second and third examples bugs or should I change some setting to get a proper handling of namespaces?
Regards,
Frans