Hi Frans,
could you send me your java class, so i can have a look at it.
-- Andreas
Am 25.03.2011 um 00:01 schrieb frans@planet:
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 xmlns="http://example.org%5C%22%3E" + "</tag>";
This yields <tag xmlns="http://example.org"/> in the GUI. So this is OK.
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 xmlns:tns="http://example.org%5C%22%3E" + "</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 xmlns:tns="http://example.org%5C%22%3E" + "</tns:tag>";
This yields <tns:tag xmlnstns="http://example.org%22/%3E 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 _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk