You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Raphaël Franchet <ra...@anyware-tech.com> on 2005/10/24 15:31:33 UTC
Xpath query, jcr:like and character '
Hello,
Following the spec 6.6.4.9, to find node with title containing the word
- test'test -, this should work:
createQuery("//*[jcr:like(@title, '%test''test%')]", Query.XPATH).execute()
but it does not find my node with a title - test'test -.
ps: it works fine with a wildcard character:
createQuery("//*[jcr:like(@title, '%test_test%')]", Query.XPATH).execute()
what is wrong ?
isn't escaping of ' not done with '' ?
thanks,
--
Raphaël FRANCHET
IT
ANYWARE TECHNOLOGIES
Tel: +33 (0)5 61 00 73 47
Fax : +33 (0)5 61 00 51 46
www.anyware-tech.com
Re: Xpath query, jcr:like and character '
Posted by Raphaël Franchet <ra...@anyware-tech.com>.
Thank you marcel.
regard,
Raphaël
Marcel Reutegger a écrit :
> Hi Raphaël,
>
> this is a bug in the XPath query builder, it does not unescape the quote
> :-/
>
> I've just committed a fix. svn revision: 328092
>
> thanks for reporting this issue!
>
> regards
> marcel
>
> Raphaël Franchet wrote:
>
>> Hello,
>>
>> Following the spec 6.6.4.9, to find node with title containing the
>> word - test'test -, this should work:
>> createQuery("//*[jcr:like(@title, '%test''test%')]",
>> Query.XPATH).execute()
>>
>> but it does not find my node with a title - test'test -.
>>
>> ps: it works fine with a wildcard character:
>> createQuery("//*[jcr:like(@title, '%test_test%')]",
>> Query.XPATH).execute()
>>
>> what is wrong ?
>> isn't escaping of ' not done with '' ?
>>
>> thanks,
>
>
Re: Xpath query, jcr:like and character '
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Raphaël,
this is a bug in the XPath query builder, it does not unescape the quote :-/
I've just committed a fix. svn revision: 328092
thanks for reporting this issue!
regards
marcel
Raphaël Franchet wrote:
> Hello,
>
> Following the spec 6.6.4.9, to find node with title containing the word
> - test'test -, this should work:
> createQuery("//*[jcr:like(@title, '%test''test%')]", Query.XPATH).execute()
>
> but it does not find my node with a title - test'test -.
>
> ps: it works fine with a wildcard character:
> createQuery("//*[jcr:like(@title, '%test_test%')]", Query.XPATH).execute()
>
> what is wrong ?
> isn't escaping of ' not done with '' ?
>
> thanks,