Comment 4 for bug 1179806

Revision history for this message
Martin Pitt (pitti) wrote :

This is a bug in xpathselect. There is no way to quote a space, like with   or   or by quoting the attribute value.

Also, quotes themselves don't work in xpathselect. I attach a patch which adds two test cases, one for a quoted value, and one for a quoted value with a space.

Please note that current xpathselect violates the xpath specification: an expression like "/Root//*[visible=True]" selects a <visible> child with a string contents "True". Nodes with an attribute with that value are selected with "/Root//*[@visible=True]" , but xpathselect currently doesn't seem to handle the @. (See http://www.w3.org/TR/xpath/#path-abbrev). Changing that would need an accompanying fix in autopilot, and I guess it's not that urgent. But regardless of that, quotes should work, so that one can select arbitrary attribute or node values.