jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Hang <jh...@bea.com>
Subject Escaping node names in xpath queries
Date Sat, 03 Mar 2007 00:55:42 GMT

We're having problems running an xpath query where a node name in the xpath
contains blank spaces.

For example, the following query won't work because of the blank space in
the name "Node A":

/jcr:root//mypath/Node A//element(*, myType) order by @cx:created ascending

We tried uri encoding the name, which replaces the space with %20, but that
gives us this error:

javax.jcr.query.InvalidQueryException: Lexical error at line 1, column 110. 
Encountered: "2" (50), after : "%": Lexical error at line 1, column 110. 
Encountered: "2" (50), after : "%": Lexical error at line 1, column 110. 
Encountered: "2" (50), after : "%"

Is there a way to get around this?

-- James

-- 
View this message in context: http://www.nabble.com/Escaping-node-names-in-xpath-queries-tf3336904.html#a9280479
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Mime
View raw message