[Xpath-ng] FIXPath (XPath NG core) straw man draft posted
Berend de Boer
berend at xsol.com
Sun Jan 5 18:22:55 MST 2003
Uche Ogbuji wrote:
>i.e. the LHS returns the nodes in *reverse* document order, does this cause
>any problem that the result of the overall expression forces everything back
>to forward document order because of the merge? I think this may indeed be a
>problem. If my doc is:
>
><a><b><c/></b><d/><e/></a>
>
>and the context node is c, then I think I would expect
>
>ancestor:*/child::*
>
>to result in
>
>[c, b, d, e, a]
>
>But the way I have merge in the straw man, instead we'd get
>
>[a, b, c, d, e]
>
>Or is my brain indeed fried? :-)
>
Eh, it looks to me you should just get [a,b] as c has no children:
<a>
<b>
<c/>
</b>
<d/>
<e/>
</a>
But generally speaking, merging gives you indeed the last kind of list,
i.e. there is no distinction anymore between ancestor, context, child or
whatsoever, just a list.
>Side note: I guess we really need a sort-doc-order() function for lists.
>
Yep, that's lot better. I was wondering if the overhead of sorting
wouldn't be to great. So with this function the list is unordered, with
this function you get document order for the cases you really need a
specific order.
--
Regards,
Berend. (-:
More information about the Xpath-ng
mailing list