Subject: Re: [xsl] A beautiful way to say: "give me the sequence after the first item"? From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 2 Dec 2022 13:17:19 -0000 |
Python has 'pythonic' methods / ways of writing. Has anyone come up with such a 'way' for XSLT? regards On Fri, 2 Dec 2022 at 13:11, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > 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 > > tail($tokens) > > in XPath 3 and > > subsequence($tokens, 2) > > in XPath 2 and later, I think. > > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] A beautiful way to say: ", Martin Honnen martin | Thread | Re: [xsl] A beautiful way to say: ", Alan Painter alan.pa |
Re: [xsl] A beautiful way to say: ", Chris Papademetrious | Date | Re: [xsl] A beautiful way to say: ", Roger L Costello cos |
Month |