Re: [xml] relative xpath matches nodes anywhere in tree



On Fri, May 25, 2012 at 06:19:49PM -0400, Noam Postavsky wrote:
On Fri, May 25, 2012 at 11:38 AM, Daniel Veillard <veillard redhat com>
 xmlXPathNewContext doesn't set the context node, it set it to NULL,
if you keep it NULL all relative evaluations will fail (which sounds
the right thing to me at the XPath level) but kind of weird from an
user point of view, so initializing to the document node sounds the best
to me.

Sure, but is there a way for a user to discover this, beside asking on
the mailing list?

  Hum, no it's really specific to xmllint, this could be added to the
man page :-)

Actually it is related, because XMLStarlet has the exact same bug as xmllint.

 okay, but a priori that's not the same initialization code path, i.e.
different bug :-)

Except that it was probably copied from xmllint, so it's the same bug :p

 okay :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]