- From: Dave Pawson <dave.pawson@gmail.com>
- Date: Mon, 30 Nov 2020 09:50:50 +0000
- To: Martin Honnen <martin.honnen@gmx.de>
- Cc: public-xslt-40@w3.org
I'm with Martin here. Dimitre, are you going overboard with your higher order functions? Is it *widely* needed in xSLT/XPATH? This isn't Lisp. regards On Mon, 30 Nov 2020 at 09:36, Martin Honnen <martin.honnen@gmx.de> wrote: > > Am 29.11.2020 um 23:53 schrieb Dimitre Novatchev: > > Now that we have thetuple/ record type, we can have some very useful > > functions on collections (both sequences and arrays) that return more > > than one result, > > or to say it in other words, return a tuple of Nthings, whereN > 1. > > > > fn:partition-at($seq as item()*, > > > > $n as xs:integer) > > > > as tuple(item()*, item()*) > > I am having a hard time following the different suggestions and merging > them mentally, aren't tuples supposed to have a field name in any case > as they are just specialized maps? > https://www.saxonica.com/qt4specs/XP/xpath-40-diff.html#id-tuple-test > > That tuple of N things looks just like an array of (N) things to me. > > > > > , returns a tuple of two sequences, the first of which is > > > > subsequence($seq, 1, $n), and the second is: > > > > subsequence($seq, $n +1) > > > > Or how would one access a the first and second field in the result of > fn:partition-at($seq, $n)? > > > > > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
Received on Monday, 30 November 2020 09:51:14 UTC