[ http://issues.apache.org/jira/browse/JCR-77?page=comments#action_61322 ]
Felix R�thenbacher commented on JCR-77:
---------------------------------------
1. Register a prefix P with a namespace N.
2. Set namespace prefix setNamespacePrefix(P, N);
2. Import XML data with Session.importXML() which
uses the registered namespace but with a different
prefix than registered.
3. Try to get an iterator I by Session.getRootNode().getNodes("P:*");
It will not contain any nodes!
4. Try to get an iterator I by Session.getRootNode().getNodes();
Use I to iterate over all nodes X and print their path:
X.getPath() will print the prefix used in the original
xml document and not the prefix previously registered
with that namespace.
Summary: the importXML() method does not map the prefix
of the imported XML data to the registered prefix.
> importXML ignores registered namespaces
> ---------------------------------------
>
> Key: JCR-77
> URL: http://issues.apache.org/jira/browse/JCR-77
> Project: Jackrabbit
> Type: Bug
> Components: xml
> Reporter: Felix R�thenbacher
>
> Importing xml data with Session.importXML() does not use prefix of registered
> namespace. A workaround is to call Session.setNamespacePrefix() after import.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira