Hi All,<br><br>I have observed some unexpected behavior with lxml -- I looked in the bug tracker and didn&#39;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 &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; from lxml.cssselect import CSSSelector<br>
&gt;&gt;&gt; CSSSelector(&quot;div div:nth-child(5) div div div:nth-child(3) img&quot;).path<br>&quot;descendant-or-self::div/descendant::*[name() = &#39;div&#39; and (position() = 5)]&quot;<br>&gt;&gt;&gt; <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>