Hi All,<br><br>I have observed some unexpected behavior with lxml -- I looked in the bug tracker and didn't see anything that seemed related to this.<br><br>daedalus:~ john$ python<br>Python 2.5.2 Stackless 3.1b3 060516 (python-2.52:61022, Feb 27 2008, 16:52:03) <br>
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin<br>Type "help", "copyright", "credits" or "license" for more information.<br>>>> from lxml.cssselect import CSSSelector<br>
>>> CSSSelector("div div:nth-child(5) div div div:nth-child(3) img").path<br>"descendant-or-self::div/descendant::*[name() = 'div' and (position() = 5)]"<br>>>> <br><br>It looks like when you use the nth-child member in a CSSSelector it chops off the rest of the CSSSelector and does not process it when compiling it down to an xpath. <br>
<br>Is this a bug or am I just doing something stupid?<br><br>Thanks,<br>-<br>John<br><br>