Re: [xml] one more xpath patch



On Fri, May 31, 2002 at 12:43:44PM -0700, Aleksey Sanin wrote:
Hi, Daniel!!./ap

I have one more xpath patch but I would like to have you review
before commiting it. Consider the following xpath expressions:
    string(self::node())
    string()
According to http://www.w3.org/TR/xpath#node-tests both these
expressions should be totaly equvivalent:
    "A node test node() is true for any node of any type whatsoever."
However, if the current node is namespace then LibXML returns
an empty string for the first expression and correct value (href) for
the second one. I found that the same problem happens when
node is an attribute. The suggested patch removes all checks
for the "::node()" function (type == NODE_TYPE_NODE) as it is
required by xpath spec. Please let me know your opinion on this.

  Hum, you could end-up with selecting a DTD node or an XINCLUDE 
leftover node. Maybe extending the node selection to have the namespace
and attributes nodes would be safer, no ?

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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