Re: [xml] one more xpath patch
- From: Aleksey Sanin <aleksey aleksey com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] one more xpath patch
- Date: Mon, 03 Jun 2002 21:44:38 -0700
Thanks for the review! I had feeling that something is wrong
with this patch but I was not sure what exactly :) I've commited
the corrected patch.
Aleksey.
Daniel Veillard wrote:
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]