You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Xiaohua Lu (JIRA)" <ji...@apache.org> on 2007/03/30 16:50:25 UTC

[jira] Created: (JCR-829) XPath character escape problem

XPath character escape problem
------------------------------

                 Key: JCR-829
                 URL: https://issues.apache.org/jira/browse/JCR-829
             Project: Jackrabbit
          Issue Type: Bug
    Affects Versions: 1.2.2
            Reporter: Xiaohua Lu


I created a node with name "a & b" but when I tried to query it with 
a &amp; b
a & b
a %26 b
a &#38 b.

they all gave exceptions like 

org.apache.jackrabbit.core.query.xpath.TokenMgrError: Lexical error at line 1, c
olumn 15.  Encountered: "2" (50), after : "%"
        at org.apache.jackrabbit.core.query.xpath.XPathTokenManager.getNextToken
(XPathTokenManager.java:14546)
        at org.apache.jackrabbit.core.query.xpath.XPath.jj_ntk(XPath.java:9187)
        at org.apache.jackrabbit.core.query.xpath.XPath.PredicateList(XPath.java
:5195)
        at org.apache.jackrabbit.core.query.xpath.XPath.AxisStep(XPath.java:4707
)
        at org.apache.jackrabbit.core.query.xpath.XPath.StepExpr(XPath.java:4597
)
        at org.apache.jackrabbit.core.query.xpath.XPath.RelativePathExpr(XPath.j
ava:4511)



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


[jira] Resolved: (JCR-829) XPath character escape problem

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

Marcel Reutegger resolved JCR-829.
----------------------------------

    Resolution: Invalid

The space and ampersand are illegal characters in an XML name. You need to encode them as described in section 6.4.3 of the JSR 170 specification.

//a_x0020__x0026__x0020_b

will work.

> XPath character escape problem
> ------------------------------
>
>                 Key: JCR-829
>                 URL: https://issues.apache.org/jira/browse/JCR-829
>             Project: Jackrabbit
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Xiaohua Lu
>
> I created a node with name "a & b" but when I tried to query it with 
> a &amp; b
> a & b
> a %26 b
> a &#38 b.
> they all gave exceptions like 
> org.apache.jackrabbit.core.query.xpath.TokenMgrError: Lexical error at line 1, c
> olumn 15.  Encountered: "2" (50), after : "%"
>         at org.apache.jackrabbit.core.query.xpath.XPathTokenManager.getNextToken
> (XPathTokenManager.java:14546)
>         at org.apache.jackrabbit.core.query.xpath.XPath.jj_ntk(XPath.java:9187)
>         at org.apache.jackrabbit.core.query.xpath.XPath.PredicateList(XPath.java
> :5195)
>         at org.apache.jackrabbit.core.query.xpath.XPath.AxisStep(XPath.java:4707
> )
>         at org.apache.jackrabbit.core.query.xpath.XPath.StepExpr(XPath.java:4597
> )
>         at org.apache.jackrabbit.core.query.xpath.XPath.RelativePathExpr(XPath.j
> ava:4511)

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