You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sridhar Raman <sr...@gmail.com> on 2008/09/18 11:06:29 UTC

Inconsistent behaviour of fn:lower-case/fn:upper-case with jcr:like

Say I have 5 nodes of type tx:Language - Hindi, Hindustani, English,
Haryanvi, Italian.

When I run query 1:
query1 = /jcr:root/CONTENT/LANGUAGES//element(*,
tx:Language)[jcr:like(@tx:name, 'Hi%')]
I get 2 results - Hindi, Hindustani.

But if I run query 2:
query2 = /jcr:root/CONTENT/LANGUAGES//element(*,
tx:Language)[jcr:like(fn:lower-case(@tx:name), 'hi%')]
I get 3 results - Hindi, Hindustani, Haryanvi.

In fact, if I run query 3:
query3 = /jcr:root/CONTENT/LANGUAGES//element(*,
tx:Language)[jcr:like(fn:upper-case(@tx:name), 'HI%')]
I get the same 3 results as for lower-case - Hindi, Hindustani, Haryanvi.

Any idea why this is happening?  Or is this expected behaviour?

Thanks,
Sridhar

Re: Inconsistent behaviour of fn:lower-case/fn:upper-case with jcr:like

Posted by Sridhar Raman <sr...@gmail.com>.
Ya, after moving to 1.4.5, it works fine.  Thanks.

On Thu, Sep 18, 2008 at 5:54 PM, Sridhar Raman <sr...@gmail.com>wrote:

> I am using 1.4.  I shall move to the latest, and try it out.
>
>
> On Thu, Sep 18, 2008 at 5:39 PM, Marcel Reutegger <
> marcel.reutegger@gmx.net> wrote:
>
>> Hi,
>>
>> what version of jackrabbit are you using? this is probably caused by
>> https://issues.apache.org/jira/browse/JCR-1408 and has been fixed in
>> 1.4.2.
>>
>> regards
>>  marcel
>>
>> Sridhar Raman wrote:
>> > Say I have 5 nodes of type tx:Language - Hindi, Hindustani, English,
>> > Haryanvi, Italian.
>> >
>> > When I run query 1:
>> > query1 = /jcr:root/CONTENT/LANGUAGES//element(*,
>> > tx:Language)[jcr:like(@tx:name, 'Hi%')]
>> > I get 2 results - Hindi, Hindustani.
>> >
>> > But if I run query 2:
>> > query2 = /jcr:root/CONTENT/LANGUAGES//element(*,
>> > tx:Language)[jcr:like(fn:lower-case(@tx:name), 'hi%')]
>> > I get 3 results - Hindi, Hindustani, Haryanvi.
>> >
>> > In fact, if I run query 3:
>> > query3 = /jcr:root/CONTENT/LANGUAGES//element(*,
>> > tx:Language)[jcr:like(fn:upper-case(@tx:name), 'HI%')]
>> > I get the same 3 results as for lower-case - Hindi, Hindustani,
>> Haryanvi.
>> >
>> > Any idea why this is happening?  Or is this expected behaviour?
>> >
>> > Thanks,
>> > Sridhar
>> >
>>
>>
>

Re: Inconsistent behaviour of fn:lower-case/fn:upper-case with jcr:like

Posted by Sridhar Raman <sr...@gmail.com>.
I am using 1.4.  I shall move to the latest, and try it out.

On Thu, Sep 18, 2008 at 5:39 PM, Marcel Reutegger
<ma...@gmx.net>wrote:

> Hi,
>
> what version of jackrabbit are you using? this is probably caused by
> https://issues.apache.org/jira/browse/JCR-1408 and has been fixed in
> 1.4.2.
>
> regards
>  marcel
>
> Sridhar Raman wrote:
> > Say I have 5 nodes of type tx:Language - Hindi, Hindustani, English,
> > Haryanvi, Italian.
> >
> > When I run query 1:
> > query1 = /jcr:root/CONTENT/LANGUAGES//element(*,
> > tx:Language)[jcr:like(@tx:name, 'Hi%')]
> > I get 2 results - Hindi, Hindustani.
> >
> > But if I run query 2:
> > query2 = /jcr:root/CONTENT/LANGUAGES//element(*,
> > tx:Language)[jcr:like(fn:lower-case(@tx:name), 'hi%')]
> > I get 3 results - Hindi, Hindustani, Haryanvi.
> >
> > In fact, if I run query 3:
> > query3 = /jcr:root/CONTENT/LANGUAGES//element(*,
> > tx:Language)[jcr:like(fn:upper-case(@tx:name), 'HI%')]
> > I get the same 3 results as for lower-case - Hindi, Hindustani, Haryanvi.
> >
> > Any idea why this is happening?  Or is this expected behaviour?
> >
> > Thanks,
> > Sridhar
> >
>
>

Re: Inconsistent behaviour of fn:lower-case/fn:upper-case with jcr:like

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

what version of jackrabbit are you using? this is probably caused by
https://issues.apache.org/jira/browse/JCR-1408 and has been fixed in 1.4.2.

regards
 marcel

Sridhar Raman wrote:
> Say I have 5 nodes of type tx:Language - Hindi, Hindustani, English,
> Haryanvi, Italian.
> 
> When I run query 1:
> query1 = /jcr:root/CONTENT/LANGUAGES//element(*,
> tx:Language)[jcr:like(@tx:name, 'Hi%')]
> I get 2 results - Hindi, Hindustani.
> 
> But if I run query 2:
> query2 = /jcr:root/CONTENT/LANGUAGES//element(*,
> tx:Language)[jcr:like(fn:lower-case(@tx:name), 'hi%')]
> I get 3 results - Hindi, Hindustani, Haryanvi.
> 
> In fact, if I run query 3:
> query3 = /jcr:root/CONTENT/LANGUAGES//element(*,
> tx:Language)[jcr:like(fn:upper-case(@tx:name), 'HI%')]
> I get the same 3 results as for lower-case - Hindi, Hindustani, Haryanvi.
> 
> Any idea why this is happening?  Or is this expected behaviour?
> 
> Thanks,
> Sridhar
>