In PHP, I\'m currently making a xpath query but I need to make it case insensitive. I\'m using is XPath 1.0 which from my query means I\'ve got to use some thing called a transl
Basically, translate is used to convert dynamic value that you need to compare to be all lower-case (or all upper-case). In this case, you want to apply translate()
to rel
attribute value, and compare the result to lower-case literal "canonical"
(formatted for readability) :
//link[
translate(@rel, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'canonical'
]