You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Felix Röthenbacher (JIRA)" <ji...@apache.org> on 2005/03/21 16:18:27 UTC
[jira] Commented: (JCR-77) importXML ignores registered namespaces
[ 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