[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Sort List of Maps By Key Value

Subject: Re: Sort List of Maps By Key Value
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Sep 2018 18:32:26 -0000
Re:  Sort List of Maps By Key Value
On 29.09.2018 20:23, Martin Honnen martin.honnen@xxxxxx wrote:
On 29.09.2018 19:57, Eliot Kimber ekimber@xxxxxxxxxxxx wrote:
Using XPath 3 maps:

I have a list of maps where all the maps have a key on whose value I want to sort the list of maps.

A list? What does that mean in the XPath type system, a sequence of maps, i.e. map(*)*?


Can't you just use
 B  $maps => sort((), function($m) { $m?sortonme })
?

In Saxon with http://saxonica.com/html/documentation/extensions/syntax-extensions/simple-inline-functions.html (--allowSyntaxExtensions:on) you could shorten that to


$maps => sort((), fn{?sortonme})

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.