I see in the JCR spec 6.6.5.2 - it states that {', ", -, \} must be escaped
by a "\". However when I try to escape a single quote with a backslash, the
query throws an xpath query syntax error. Is the JCR spec correct or is
there other documentation about what characters need to be escaped? I am
already using the ISO9075 class to encode any node paths in my query. It
would be even better if there is already a method that escapes search
strings. The following is the query that fails. I am trying to pass the
string "test's" into the contains(), but when i escape the single quote with
a backslash, the query throws a sytax error.
/jcr:root/app_x0020_root//[EMAIL PROTECTED]:primaryType = 'cwe:file' and
jcr:contains(jcr:content, 'test\'s')]/(rep:excerpt()) order by @jcr:score
descending
--
View this message in context:
http://www.nabble.com/escape-characters-in-search-query-expression-tf4337638.html#a12355543
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.