jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <...@tfd.co.uk>
Subject Re: xpath querying for node with @ in the name
Date Mon, 13 Sep 2010 23:47:38 GMT
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
View raw message