I agree that this case is so simple that you don't need to use
xsl:apply-templates at all and can either in-line all of the xpath
expressions or can convert the templates to functions. I do like breaking
things up into templates so was hoping that I was just missing something
and that there was a nice way of achieving it.
I hadn't thought about the construction "books/book!map { ... }" and that
is something to consider. I appreciate your pointing it out.
I'm looking forward to XSLT 4.
On Fri, Jun 18, 2021 at 8:54 PM Liam R. E. Quin
liam(_at_)fromoldbooks(_dot_)org <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
On Fri, 2021-06-18 at 18:41 +0000, Alan Painter
alan(_dot_)painter(_at_)gmail(_dot_)com
wrote:
Is there a more elegant way of doing this?
I don't think so; you could construct maps with integer keys and then
convert them, but i don't think that's remotely elegant.
--
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
--~--