Re: [xml] XPath // vs. descendant-or-self

On Tue, Nov 14, 2006 at 09:52:37AM +0100, François Delyon wrote:
With libxml 2.6.27, xpath expressions "//" and "descendant-or-self"  
behaves differently.

For instance, on an html document "//body" returns nothing, but  
"descendant-or-self::body" returns the body element.
If I change xmlXPathCanRewriteDosExpression into return 0, both  
expressions now return the body element (as in 2.6.24).

I can't understand if the bug is in xmlXPathRewriteDOSExpression or  

  First subscribe to the mailing list or check teh email you're subscribed
from I can't just approve your mail manually.
  Second please enter a bugzilla explaining how you got this, this works for
me on a basic test:

  paphio:~/XML -> xmllint --html --shell tst.html 
  / > xpath //body
  Object is a Node Set :
  Set contains 1 nodes:
  1  ELEMENT body
  / >

  In general I can't chase a problem I can't reproduce, and if XPath was
really that broken I think the libxslt regression tests would have raised that
immediately. There is something you are doing (or not doing) which causes
it and I have no cristall ball (as usual !)


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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