[lxml-dev] problem\bug in xpath compare() with text in tail

Matan Ninio matan at xipus.lxmldev.ninio.org
Sat May 24 22:41:24 CEST 2008


Raymond Wiker <rwiker <at> gmail.com> writes:

> 
> On May 24, 2008, at 21:46 , John W. Shipman wrote:
> 
> > matan ninio wrote:
> >
> > +--
> > | Is there some good place to look for information about XPath?
> > +--
> >
> > If I might recommend my modest XSLT reference:
> >
> >    http://www.nmt.edu/tcc/help/pubs/xslt/
> >
> > It has a section on XPath.
> 
> There's also some good stuff on  http://www.zvon.org.
> 



Thanks for the links.  I have already read several of them, including the very
nice one in zvon.org mentioned above.  But I'm yet to find the bit of
information i'm missing.  Why dose the behavior of "text()" change to exclude
tail elements when moving from "//text()" to "//*[contains(text(),'ABC')]"?  
What does the "text()" function *actually* do?  I can see that if an element
where to have more then one text value, the meaning of "contains(text()," may be
unclear.  But they why is the //text() version actually pulling out the tail
elements?

This thread is somewhat off-topic.  I am new to this list, so i really don't
know if it's considered acceptable to discuss such topics here.  If not, I
apologize and will take this elsewhere.

Thanks again, Matan



More information about the lxml-dev mailing list