Hi

I am trying to issue a Xpath query that will return all images from a folder.
I am filtering on predicate type='extension' where extension can be jpg, jpeg, 
png, gif.
The problem is that those extensions can contain any combination of cases (e.g. 
jpg, Jpg, JPG, jpG, etc, etc) so I want to make the filter case insensitive.

Rather than using 20+ ORs to match every combination I thought using function 
would like lower-case would work better.
Following are the query combinations I tried without success (includes one 
extension for now) 


/jcr:root/site1/library/image/background//element(*,nt:base)[EMAIL 
PROTECTED]:lower-case(type)='jpg']
/jcr:root/site1/library/image/background//element(*,nt:base)[fn:lower-case(@type)='jpg']
/jcr:root/site1/library/image/background//element(*,nt:base)[EMAIL 
PROTECTED](type)='jpg']
/jcr:root/site1/library/image/background//element(*,nt:base)[lower-case(@type)='jpg']
/jcr:root/site1/library/image/background//element(*,nt:base)[lower-case(type)='jpg']

None of these worked :(

If someone knows how to properly apply the function in a predicate I would be 
much grateful...


Regards
Amir

Reply via email to