• case insensitive search using XPath queries

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #2561  by bragarwal
 
Since XPath is case sensitive, I was not able to search the files with different case. I tried little modification in the XPath queries to search documents irrespective of the case, but it did not worked. Please have a look and let me know if I am doing anything wrong.

1.) Normal way to search file using XPath query (case sensitive) :
/jcr:root/okm:root//element(*,okm:document)[@okm:name = \'ExcelFile.xls\']

2.) Alternate way to search file using XPath query (case insensitive) :
/jcr:root/okm:root//element(*,okm:document)[translate(@okm:name, \'ABCDEFGHIJKLMNOPQRSTUVWXYZ\', \'abcdefghijklmnopqrstuvwxyz\') = ExcelFile.xls.ToLower()]

3.) Another way to search files (case insensitive) :
/jcr:root/okm:root//element(*,okm:document)[lower-case(@okm:name) = lower-case(\'ExcelFile.xls\')]

4.) Another way to search files (case insensitive) :
/jcr:root/okm:root//element(*,okm:document)[translate(@okm:name, \'ABCDEFGHIJKLMNOPQRSTUVWXYZ\', \'abcdefghijklmnopqrstuvwxyz\') = translate(\'ExcelFile.xls\', \'ABCDEFGHIJKLMNOPQRSTUVWXYZ\', \'abcdefghijklmnopqrstuvwxyz\')]

Pavilla/Jillort can u shed some light on it, let me know if i am doing anything wrong.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.