Re: [xsl] A beautiful way to say: "give me the sequence after the first item"?

Subject: Re: [xsl] A beautiful way to say: "give me the sequence after the first item"?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Dec 2022 13:11:19 -0000
Am 12/2/2022 um 2:09 PM schrieb Roger L Costello costello@xxxxxxxxx:
Hi Folks,

I have a variable, $tokens, whose value is a sequence of items.

I want to select all items after the first item. Here is one way to do it:

$tokens[position() gt 1]

To my eyes, that is not beautiful code.

Is there a beautiful (i.e., succinct) way to select all items after the
first item?

There is

B tail($tokens)

in XPath 3 and

B subsequence($tokens, 2)

in XPath 2 and later, I think.

Current Thread