jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Röthenbacher (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-77) importXML ignores registered namespaces
Date Mon, 21 Mar 2005 15:18:27 GMT
     [ 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


Mime
View raw message