Re: [xsl] Converting a sequence of xs:string to a map

Subject: Re: [xsl] Converting a sequence of xs:string to a map
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Jan 2026 20:52:59 -0000
On 12/01/2026 21:48, Christophe Marchand christophe@xxxxxxxxxxxx wrote:
I have a sequence of xs:string : ('amount', 'vat-rate', 'total')
And I want a map where keys are the labels from the sequence, and
values are the position of label in sequence : { 'amount': 1,
'vat-rate': 2, 'total': 3}


One way would be

(('amount', 'vat-rate', 'total') ! map:entry(., position())) => map:merge()

Current Thread