Assume:
<foo bar="one two three">
How do I match all the foo
tags that has the attribute bar
with the value one
(and I don't care what other attribute values might exist). This doesn't seem to work:
//foo[@bar="one"]
The standard idiom for that is:
//foo[contains(concat(' ', normalize-space(@bar), ' '), ' one ')]
//foo[tokenize(@bar,'\s+')='one']