jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Invalid Xpath expressions?
Date Tue, 22 Sep 2009 16:37:25 GMT
On Tue, Sep 22, 2009 at 17:25, Rimfrost74 <anders.grusell@gmail.com> wrote:
> I have problems with some Xpath-expressions, where node names begins with a
> number, for instance:
> the path "/a/b/2bs" gives me trouble, also
> paths with space like "/a/b/c d".
> Jackrabbit has no trouble storing items and nodes, but searching with xpath
> is a problem.
> Anyone that can help or point to dicumentation fopr what is a valid
> Xpath-expresseion?

See this recent thread that summarizes all encoding/escaping topics
wrt Jackrabbit quite nicely:
http://markmail.org/message/m6q5l6ljbqda23lf

For paths in XPath, node names cannot start with a number (this comes
from XML). There is the utility class
org.apache.jackrabbit.util.ISO9075 in jackrabbit-jcr-commons.jar that
provides proper escaping for that.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message