[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] sxpath does not preserve node order
From: |
Sascha Ziemann |
Subject: |
Re: [Chicken-users] sxpath does not preserve node order |
Date: |
Fri, 05 Dec 2014 12:24:36 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.4 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Fri, 05 Dec 2014 11:55:39 +0100,
Jörg F. Wittenberger wrote:
>
> Am 04.12.2014 um 21:25 schrieb Sascha Ziemann:
> > It seems to me that the use of //* duplicates the inner 'a' node:
>
> That's not what it does. I'm not completely sure that XPath does
> require this behavior, but I tend to believe this is the right thing to
> do. "//" is supposed to yield all descendant nodes, in this example the
> second "span" (sure including this "span"'s descendant "a") and the "a"
> node itself.
Ok this could be true. Saxon seems to do it in this way.
echo '<span><a/></span>' | java -cp saxon9he.jar net.sf.saxon.Query
'!omit-xml-declaration=1' -s:- -qs:'//*' ; echo
<span><a/></span><a/>
Regards,
Sascha