In CSS, it turns out you can specify a colon in an attribute name by escaping it.
This is not valid:
But this is:
And cssselect fails on the former and supports the later, as it should, only that it fails to translate it into a valid XPath expression. It turns it into:
descendant-or-self::*/@:foo
I’m not sure what the best XPath translation would be (this?), but the current one seem to be invalid XPath.
In CSS, it turns out you can specify a colon in an attribute name by escaping it.
This is not valid:
But this is:
::attr(\:foo)And
cssselectfails on the former and supports the later, as it should, only that it fails to translate it into a valid XPath expression. It turns it into:I’m not sure what the best XPath translation would be (this?), but the current one seem to be invalid XPath.