On Sat, May 26, 2012 at 12:09:09PM -0400, Noam Postavsky wrote:
On Sat, May 26, 2012 at 8:32 AM, Daniel Veillard veill...@redhat.com wrote:
On Fri, May 25, 2012 at 06:19:49PM -0400, Noam Postavsky wrote:
On Fri, May 25, 2012 at 11:38 AM, Daniel Veillard veill...@redhat.com
On Wed, 2012-06-06 at 14:51 +0800, Daniel Veillard wrote:
One of the reasons why that initialization of the context is not
specified in the XPath standard is due to the fact that the standard was
done with the intent to be reused (by XPointer/XLink and XSLT) and we
didnt really expected
On Fri, May 25, 2012 at 06:19:49PM -0400, Noam Postavsky wrote:
On Fri, May 25, 2012 at 11:38 AM, Daniel Veillard veill...@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
On Sat, May 26, 2012 at 8:32 AM, Daniel Veillard veill...@redhat.com wrote:
On Fri, May 25, 2012 at 06:19:49PM -0400, Noam Postavsky wrote:
On Fri, May 25, 2012 at 11:38 AM, Daniel Veillard veill...@redhat.com
xmlXPathNewContext doesn't set the context node, it set it to NULL,
if you keep
On Fri, May 25, 2012 at 01:44:22AM -0400, Noam Postavsky wrote:
So apparently when libxml2 evaluates an XPath expression that is
relative it searches everywhere in the tree, as if the expression
started with //. For instance
~/tmp$ cat test.xml
?xml version=1.0?
x
yTest/y
/x
On Fri, May 25, 2012 at 4:44 AM, Daniel Veillard veill...@redhat.com wrote:
Actually the error is in --xpath implementation in xmllint :-)
static void doXPathQuery(
...
ctxt-node = xmlDocGetRootElement(doc);
res = xmlXPathEval(BAD_CAST query, ctxt);
here the initialization is
On Fri, May 25, 2012 at 10:44:35AM -0400, Noam Postavsky wrote:
On Fri, May 25, 2012 at 4:44 AM, Daniel Veillard veill...@redhat.com wrote:
Actually the error is in --xpath implementation in xmllint :-)
static void doXPathQuery(
...
ctxt-node = xmlDocGetRootElement(doc);
res
On Fri, May 25, 2012 at 11:38 AM, Daniel Veillard veill...@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
So apparently when libxml2 evaluates an XPath expression that is
relative it searches everywhere in the tree, as if the expression
started with //. For instance
~/tmp$ cat test.xml
?xml version=1.0?
x
yTest/y
/x
~/tmp$ xmllint --xpath y test.xml
yTest/y
My understanding of XPath says