On Thu, 2020-08-13 at 03:10 +0000, Mukul Gandhi
gandhi(_dot_)mukul(_at_)gmail(_dot_)com
my intuition, would have been to go with a loop (sometimes, I still
think
procedurally amidst XSLT's template paradigm).
Note that XSLT does not have, and has never had, loops in the
procedural sense (although there's a saxon:while extension which is
close).
For example, the XSLT processor is free to evalueate for-each in any
order, as long as the result ends up sorted appropriately.
But it's a common impression that many people have, that for-each is a
loop. The impression can lead to problems in corner cases.
I agree with you that Dmitre's solution is elegant.
Liam
--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
--~----------------------------------------------------------------
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
--~--