jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-241) Remapping the default namespace
Date Thu, 06 Oct 2005 18:03:04 GMT
    [ http://issues.apache.org/jira/browse/JCR-241?page=comments#action_12331517 ] 

Roy T. Fielding commented on JCR-241:
-------------------------------------

Jukka's comment is right on the mark.  It is typical for XML documents
to have one namespace declaration with an empty prefix, frequently
for the sake of backwards compatibility with tools that do not understand
namespaces at all.  It is also common for people to import XML that
has no declared namespaces and then want to go in and add namespaces to those elements after
the fact.

So, I'd say we need the ability to assign the empty prefix to a namespace
and also the ability to change the namespace of individual names even if they have no current
namespace assigned.  I don't know if Jackrabbit already supports those idioms, but they are
so common that we will need to support them regardless of the specs.


> Remapping the default namespace
> -------------------------------
>
>          Key: JCR-241
>          URL: http://issues.apache.org/jira/browse/JCR-241
>      Project: Jackrabbit
>         Type: Wish
>     Reporter: Jukka Zitting
>     Priority: Minor
>      Fix For: 1.0

>
> I'm not sure if this is a bug, feature or standard behaviour, but currently it is not
possible to remap the default namespace to some other prefix. The following code throws a
NamespaceException:
>     session.setNamespacePrefix("foo", "");
> At least the Session.setNamespacePrefix() javadoc doesn't seem to prohibit changing the
prefix of the default namespace and I couldn't find anything more specific in the JCR specification
document. Restrictions are only placed on remapping the xml namespace.
> Note that the current nodetype code is actually relying on the default namespace being
mapped to the empty prefix, so changing this would require small changes there as well.
> I haven't really run into any cases where I'd have needed such functionality, but it
would be nice to clarify this issue.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message