xsl-list
[Top] [All Lists]

Re: [xsl] XPath expression that yields the same result as xsl:for-each-group?

2019-05-30 09:29:06
On 30.05.2019 16:10, Michael Kay mike(_at_)saxonica(_dot_)com wrote:
I would normally use maps for grouping in XPath 3.1.

Maps are nice and compact for grouping, I agree, but in the end I find
that using them I can't conserve the original input order or control the
order of items at all as I am used to from XSLT 2 with normal grouping.

So in most cases the requirements are not only to group but also to
establish an order for the groups, sometimes the original input order,
sometimes based on sort keys, and with items in a map being essentially
without order I often find it at least inconvenient to first create a
map and later have to ensure I get the wanted order when outputting the map.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>