One might think the corresponding E4X query for the XPath query, //*[@foo = "bar"]
, would be ..*.(@foo == "bar")
, but that will throw an error whenever it gets to an element without a foo attribute. I am currently using ..*.(function::valueOf().@foo == "bar")
instead.
My question is if there is another, less of a hack-way to do this.