jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Hall <c...@hallwaytech.com>
Subject Re: xpath querying for node with @ in the name
Date Tue, 14 Sep 2010 15:47:30 GMT
I was able to use ISO9075.encodePath(String) to get this working.


On Tue, Sep 14, 2010 at 7:40 AM, Carl Hall <carl@hallwaytech.com> wrote:

> I tried escaping @ as \@ but the parser fussed about having a \ in that
> position.  Am I escaping it incorrectly?
>
> As a test, I tried replacing @ with %40 and the parser didn't like %.
>
>
> On Mon, Sep 13, 2010 at 7:47 PM, Ian Boston <ieb@tfd.co.uk> wrote:
>
>> Have you tried escaping the @
>> IIRC there is a JCRUtils method for the purpose.
>> Ian
>>
>> On 14 Sep 2010, at 06:55, Carl Hall wrote:
>>
>> > I'm using the following XPath and can't get around having an @ symbol in
>> a
>> > node name (name == "test@example.com").  Is there a way for me to
>> escape
>> > this so I can query?
>> >
>> > //element(*, sakai:pooled-content)[(jcr:contains(., '*') or
>> > jcr:contains(jcr:content, '*')) and (t/te/
>> > test@example.com/@sakai:pooled-content-manager='test@example.com') ]
>> order
>> > by @jcr:created descending
>> >
>> >
>> > Before we started allowing @ in the username, the query worked fine but
>> > fails now with: "Encountered: "@" (64), after : ""
>> > at
>> >
>> org.apache.jackrabbit.spi.commons.query.xpath.XPathTokenManager.getNextToken(XPathTokenManager.java:13261)"
>> >
>> > Thanks,
>> > Carl
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message