Re: New axes?

I can see that being frequently convenient, but you would have to be clear whether you want following-sibling::* rather than following::*.

Why * and not node()?  I don't think anyone will care about the document-node, but previous::text() might feel a little like a lost opportunity.

Also how about sibling::node() as a synonym of (following-sibling::node()|preceding-sibling::node()) or (../node() except .) ?

Thanks,
Tom
On 2 Dec 2020, 09:26 +0000, Michael Kay <mike@saxonica.com>, wrote:
> How would anyone feel about adding new axes next::* and previous::* to get the first following/preceding sibling?
>
> Or next-sibling / previous-sibling if people prefer long names.
>
> It would have to be that next::* means following-sibling::*[1], rather than following-sibling::node()[1][self::*]. This is inconsistent with the parent axis, where parent::document-node() means ancestor::node()[1][self::document-node()]. But I doubt anyone would lose sleep over the inconsistency.
>
> Another two candidates are following-sibling-or-self::* and preceding-sibling-or-self::*, with hopefully obvious semantics.
>
> Michael Kay
> Saxonica

Received on Wednesday, 2 December 2020 09:32:54 UTC