You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Filippo Fratoni (JIRA)" <ji...@apache.org> on 2007/08/06 16:21:59 UTC

[jira] Created: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

JCR valid names  not allowed in Xpath xml sintax
------------------------------------------------

                 Key: JCR-1052
                 URL: https://issues.apache.org/jira/browse/JCR-1052
             Project: Jackrabbit
          Issue Type: Improvement
          Components: xpath
    Affects Versions: 1.3
         Environment: WIndows 2003/xp server/client
Tomcat 6.0.x
            Reporter: Filippo Fratoni


ref: JCR-579
 
I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 

I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.

For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.

Thanks in advance 

Filippo

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


[jira] Commented: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518148 ] 

Julian Reschke commented on JCR-1052:
-------------------------------------

I don't see how the query engine itself could be changed, without breaking the JSR-170 semantics.

If you just want a generic utility class be present, let's be clear about that.


> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>         Attachments: Xpath_basic_encoding.txt
>
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Commented: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Filippo Fratoni (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539799 ] 

Filippo Fratoni commented on JCR-1052:
--------------------------------------

Sorry for very late answer.
I don't consider this request as Bug but Improvement request.

Let me explain better the scenario.

Expectation:
When working with JCR implementation I need to work with paths for every
kind of functional implementation, and paths I can use with
hierarchy manager ar JCR Specification compliant.  So  when I'm going to
query  JCR  my expectation  is to deal  with  paths  I'm  using with
hierarchy manager.

Real case:
When I'm going to query along path of the form "Alevel/Blevel/3Level" this
paths breaks XML Specifications an XPath parser can't build the tree.

JCR Specifications says:
XPath query "must" be run against xml document representation of jcr
structure. They don't assert anything about the owner of the conversion from
jcr names to xml names.


Suggestion:
I'm using JackRabbit to develope complex taxonomies and resource hierarchies
with strong and complex query need. Conversion between JCR end XML become  a
big Issue. In this cases an Xpath parser that transparently accept JCR path
can be a great plus. Xpath localNames may contains numeric starting
character to allow tree creation and than may apply ISO9075 conversion.

thanks for paying attention to my request

Filippo














> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>         Attachments: Xpath_basic_encoding.txt
>
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Commented: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Filippo Fratoni (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517997 ] 

Filippo Fratoni commented on JCR-1052:
--------------------------------------

Ok,
I'll try with an example.
In the attached file you can find two function I've used to accomplish my project needs.

That clearly a basic solution and in my opinion in the wrong place. In fact I've encoded the statement just before
invoking JackRabbit QueryManagerImpl.

This kind of token's analysis may be done inside XPathTokenManager. In this way XpathQueryBuilder can visit with consistent parsed node.

I hope this can help you to evaluate this 'improvement'. 
thanks again

Filippo

> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Commented: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Filippo Fratoni (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518109 ] 

Filippo Fratoni commented on JCR-1052:
--------------------------------------

I'll send you in few days a complete tested solution for encoding xpath
query, my last attachment is just an example.
You can then decide to embedd it inside TokenManager or to expose it as
utility class.
I'll post it as soon as possible



> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>         Attachments: Xpath_basic_encoding.txt
>
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Resolved: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved JCR-1052.
--------------------------------

    Resolution: Won't Fix

Resolving as Won't Fix based on Julian's comments.

> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>         Attachments: Xpath_basic_encoding.txt
>
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Commented: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518002 ] 

Julian Reschke commented on JCR-1052:
-------------------------------------

So are you suggesting to add this as some kind of utility class?


> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>         Attachments: Xpath_basic_encoding.txt
>
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Updated: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Filippo Fratoni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filippo Fratoni updated JCR-1052:
---------------------------------

    Attachment: Xpath_basic_encoding.txt

> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>         Attachments: Xpath_basic_encoding.txt
>
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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


[jira] Commented: (JCR-1052) JCR valid names not allowed in Xpath xml sintax

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517964 ] 

Julian Reschke commented on JCR-1052:
-------------------------------------

Hm, I don't see a bug here.

It's correct that name escaping is a problem, but I don't see how Jackrabbit can change that. 

Maybe you could clarify?



> JCR valid names  not allowed in Xpath xml sintax
> ------------------------------------------------
>
>                 Key: JCR-1052
>                 URL: https://issues.apache.org/jira/browse/JCR-1052
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: xpath
>    Affects Versions: 1.3
>         Environment: WIndows 2003/xp server/client
> Tomcat 6.0.x
>            Reporter: Filippo Fratoni
>
> ref: JCR-579
>  
> I'm working with Magnolia CMS that relies on Jackrabbit jcr Impl  1.3. 
> I can't query valid JCR path using Jackrabbit SearchManager in xpath mode due to different spec. between JCR names and XML names.
> The ISO9075 approach in jackrabbit commons library is name based and not path based. The result is the need to parse again full path in an Xpath compliant way to recursively encode non XML names. 
> I think that the owner of this enhancement should be SearchManager class or one of its collaborators(the parser for example) to ensure the consistence of JackRabbit jcr impl.
> For my project needs I'm going to token path string with "/" separator and then apply ISO9075 encode. It will be ok for my actual project.
> Thanks in advance 
> Filippo

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