You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tobias Strasser (JIRA)" <ji...@apache.org> on 2005/10/05 17:15:54 UTC

[jira] Created: (JCR-240) locally remapped xml namespace cannot be 'reverted'

locally remapped xml namespace cannot be 'reverted'
---------------------------------------------------

         Key: JCR-240
         URL: http://issues.apache.org/jira/browse/JCR-240
     Project: Jackrabbit
        Type: Bug
 Environment: r294964
    Reporter: Tobias Strasser
    Priority: Minor


the following throws an exception, but should work:

// remap xml namespace -> works
Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");

// revert mapping -> throws exception
Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Closed: (JCR-240) redefinition of xml-namespace mapping should not be allowed

Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-240?page=all ]
     
Tobias Strasser closed JCR-240:
-------------------------------


> redefinition of xml-namespace mapping should not be allowed
> -----------------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor
>      Fix For: 1.0

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Updated: (JCR-240) redefinition of xml-namespace mapping should not be allowed

Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-240?page=all ]

Tobias Strasser updated JCR-240:
--------------------------------

    Summary: redefinition of xml-namespace mapping should not be allowed  (was: locally remapped xml namespace cannot be 'reverted')

> redefinition of xml-namespace mapping should not be allowed
> -----------------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Assigned: (JCR-240) locally remapped xml namespace cannot be 'reverted'

Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-240?page=all ]

Tobias Strasser reassigned JCR-240:
-----------------------------------

    Assign To: Tobias Strasser

> locally remapped xml namespace cannot be 'reverted'
> ---------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Commented: (JCR-240) locally remapped xml namespace cannot be 'reverted'

Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-240?page=comments#action_12331390 ] 

Tobias Strasser commented on JCR-240:
-------------------------------------

LocalNamespaceMappings should check if already 'hidden':

[...]
        // special case: prefixes xml*
        if (prefix.toLowerCase().startsWith(QName.NS_XML_PREFIX)) {
            // if the global prefix is hidden, allow reverting
            if (!hiddenPrefixes.contains(prefix)) {
                throw new NamespaceException("reserved prefix: " + prefix);
            }
        }
[...]

> locally remapped xml namespace cannot be 'reverted'
> ---------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Commented: (JCR-240) locally remapped xml namespace cannot be 'reverted'

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-240?page=comments#action_12331391 ] 

Stefan Guggisberg commented on JCR-240:
---------------------------------------

> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace"); 

i guess this is not correct. i might be mistaken but i thought that it is illegal 
to remap "http://www.w3.org/XML/1998/namespace". 
the above stmt should fail IMO.

> locally remapped xml namespace cannot be 'reverted'
> ---------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Resolved: (JCR-240) redefinition of xml-namespace mapping should not be allowed

Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-240?page=all ]
     
Tobias Strasser resolved JCR-240:
---------------------------------

    Fix Version: 1.0
     Resolution: Fixed

fixed.

Author: tripod
Date: Wed Oct  5 09:33:51 2005
New Revision: 295030


> redefinition of xml-namespace mapping should not be allowed
> -----------------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor
>      Fix For: 1.0

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Commented: (JCR-240) locally remapped xml namespace cannot be 'reverted'

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-240?page=comments#action_12331392 ] 

Stefan Guggisberg commented on JCR-240:
---------------------------------------

see http://www.w3.org/XML/1998/namespace:

<quote>
The namespace whose name is http://www.w3.org/XML/1998/namespace is bound by definition to the prefix xml: according to Namespaces in XML, W3C Recommendation 14 Jan 1999 (and by Namespaces in XML 1.1). Note that unlike all other XML namespaces, both the name and the prefix are specified; 
...
</quote>

the following stmt should therefore throw an exception:

Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");


> locally remapped xml namespace cannot be 'reverted'
> ---------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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


[jira] Commented: (JCR-240) locally remapped xml namespace cannot be 'reverted'

Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-240?page=comments#action_12331395 ] 

Tobias Strasser commented on JCR-240:
-------------------------------------

ok, thanks for finding this. so i will adapt the code, that remapping the XML namespace is not possible in the first place

> locally remapped xml namespace cannot be 'reverted'
> ---------------------------------------------------
>
>          Key: JCR-240
>          URL: http://issues.apache.org/jira/browse/JCR-240
>      Project: Jackrabbit
>         Type: Bug
>  Environment: r294964
>     Reporter: Tobias Strasser
>     Assignee: Tobias Strasser
>     Priority: Minor

>
> the following throws an exception, but should work:
> // remap xml namespace -> works
> Session.setNamespacePrefix("foobar", "http://www.w3.org/XML/1998/namespace");
> // revert mapping -> throws exception
> Session.setNamespacePrefix("xml", "http://www.w3.org/XML/1998/namespace");

-- 
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