jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Damioli <cedric.dami...@anyware-tech.com>
Subject Re: problem escaping reserved characters in XPath
Date Mon, 26 Feb 2007 11:46:07 GMT
AFAIK, ' characters must be escaped twice in jcr:contains() query : once 
for XPath (with two '), once for jcr:contains (with a \).
Your query should be :

//element(*,okm:document)[jcr:contains(@okm:name,'\''eee')]

Regards,
Cédric


Paco Avila a écrit :
> According to the specification (6.6.5.2) jcr:contains() expression must
> be escaped if it includes some characters like ' , but my query fails:
>
> 	//element(*,okm:document)[jcr:contains(@okm:name,'\'eee')]
>
> Lexical error at line 1, column 79. Encountered:  after : "\')] return
> $v": Lexical error at line 1, column 79. Encountered:  after : "\')]
> return $v"
>
>   

-- 
Cédric Damioli
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 73 47
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com


Mime
View raw message