[ 
https://issues.apache.org/jira/browse/JCR-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747911#action_12747911
 ] 

Stefan Guggisberg commented on JCR-2275:
----------------------------------------

> Instead of custom rules like this, I'd rather use the expanded form rule that 
> the URI part always contains a colon. Thus the following test will always 
> detect whether a name is in expanded form:
>
>   name.startsWtih("{") &&  name.indexOf(':") != -1
>
> The only problem is the "internal" namespace used with the "rep:" prefix. For 
> now we can treat that as a special case:
>
>   name.startsWtih("{") &&  (name.indexOf(':") != -1 || 
> name.startsWith("{internal}"))

i was considering this as well, but then it felt somehow strange to cover a 
special jackrabbit-core case in the generic spi-commons module...

>
> I would also recommend that we migrate from "internal" to using a proper 
> namespace URI like "http://jackrabbit.apache.org/ns/2009/internal";.

agreed, +1 

according to the spec, the namespace has to be a proper uri as defined in 
setion 3 of rfc 3986, i.e. it always must contain a scheme part delimited by a 
colon.

test cases will need to be adapted as well.



> some legal jcr names cause unneccessary server-roundtrips 
> ----------------------------------------------------------
>
>                 Key: JCR-2275
>                 URL: https://issues.apache.org/jira/browse/JCR-2275
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-jcr2spi
>            Reporter: Stefan Guggisberg
>         Attachments: JCR-2275.patch
>
>
> assume the following legal qualified jcr names:
> "{foo}"
> "{foo} bar"
> when items with such names are read from the spi layer, they are first 
> interpreted as expanded form names.
> a prefix lookup for namespace 'foo' fails and the name is treated as 
> qualified jcr name.
> => depending on the spi implementation, a server-roundtrip is required in 
> order to determine that 'foo' is not a
> registered namespace. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to