On Fri, May 25, 2012 at 4:44 AM, Daniel Veillard <[email protected]> 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 done with the Root element instead of > doc itself which is the classic initialization of the context node when > none is specified, leading to the error,
Ah, in that case it would be helpful if the documentation mentioned the correct way to initialize. Using the doc to indicate that the context is Root seems surprising to me. >> PS this came up because of an XMLStarlet bug report: >> http://sourceforge.net/tracker/index.php?func=detail&aid=3527850&group_id=66612&atid=515106 > > I think that's unrelated :-) Actually it is related, because XMLStarlet has the exact same bug as xmllint. _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] https://mail.gnome.org/mailman/listinfo/xml
