... rather than rejecting them. Fix Kozea/WeasyPrint#128
See http://www.w3.org/TR/selectors/#casesens Pseudo-classes were already case-insensitive, but the lower-casing was moved to the parser.
For element names, these are equivalent in XPath: foo *[name() = "foo"] And for attribute names: @foo attribute:*[name() = "foo"] The former is faster but some characters are not allowed in it. Since I am not sure which characters, only use it for "safe" names that match ^[a-zA-Z_][a-zA-Z0-9_.-]*$ This is overly restrictive, but should cover every name actually used in XML, HTML, SVG, etc.