[Pull 30] Use regexp for cssselect ":contains()" pseudo-class

This provides: * portability with other xslt processors * removes the 'css' global prefix assignment which can cause unexpected behaviour when working with xml files using that prefix * a slight performance improvement Users now need to explicitly pass in the regexp namespace when calling the ``xpath()`` method if they use the deprecated ``:contains()`` pseudo-class. https://github.com/lxml/lxml/pull/30 Laurence

On 7 February 2012 15:25, Laurence Rowe <l@lrowe.co.uk> wrote:
This provides:
* portability with other xslt processors * removes the 'css' global prefix assignment which can cause unexpected behaviour when working with xml files using that prefix * a slight performance improvement
Users now need to explicitly pass in the regexp namespace when calling the ``xpath()`` method if they use the deprecated ``:contains()`` pseudo-class.
Given that :contains(string) was dropped from the final CSS3 draft, I'm wondering if the right thing to do here is to make it match the jQuery implementation and match text case sensitively. That will be both faster and simpler as it can then compile down to a simple xpath contains(). Laurence
participants (1)
-
Laurence Rowe