This is wrong -- you are using the XPath union operator | on boolean values.
Solution: use the XPath or operator:
The above XPath expression (the value of the test attribute) can be optimized, so that only one comparison is made and no or is necessary: