Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

AEM 6.2 Predicate fn:lowercase generate special characters

Avatar

Level 3

 final Predicate authorNamePredicate = new Predicate("@authorName", "property");
            authorNamePredicate.set(JcrPropertyPredicateEvaluator.OPERATION, JcrPropertyPredicateEvaluator.OP_LIKE);
            authorNamePredicate.set(QueryUtils.PROPERTY, "@fn:lower-case("+CharacterConstants.SLASH +JcrConstants.JCR_CONTENT + CharacterConstants.SLASH + "authorName)");
            authorNamePredicate.set(QueryUtils.VALUE, authorName.toLowerCase());
            group.add(authorNamePredicate);

This is the code used to generate xpath query that is added below

=/jcr:root/content/geo//*[@jcr:primaryType = 'cq:Page' and not(jcr:content/@hideInNav) and jcr:content/@jcr:title != 'Master Article' and jcr:like(fn:lower-case_x0028_/jcr:content/@authorName_x0029_, 'soumik dey')]/rep:excerpt(.) order by jcr:content/@cq:lastModified descending

special characters generating area are highlighted in bold. Could you please help me to sort out this.

Thanks!,

Devakrishna 

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi 

Please have a look at this forum thread:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//  we never officially supported functions.  Hence not a bug. You have to file enhancement request to support xpath function. it is a known problem with the OAK repository

Please create a day care ticket for this.

 

Reference post telling about toupper/toLower in AEM :- http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html

// You need to create a create custom query predicate.

I hope this would help you.

~kautuk



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 10

What version of AEM are you using? 

Avatar

Correct answer by
Administrator

Hi 

Please have a look at this forum thread:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//  we never officially supported functions.  Hence not a bug. You have to file enhancement request to support xpath function. it is a known problem with the OAK repository

Please create a day care ticket for this.

 

Reference post telling about toupper/toLower in AEM :- http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html

// You need to create a create custom query predicate.

I hope this would help you.

~kautuk



Kautuk Sahni