One possibility, to handle different languages: The XPath parser can be made to use PHP functions, can it not? Instead of using "translate", allowing XPath to use strtolower, or even using some of the other string comparison functions from PHP might allow this to be done a little more flexibly.