Re: [xsl] constructing arrays in XSLT with templates

Subject: Re: [xsl] constructing arrays in XSLT with templates
From: "Alan Painter alan.painter@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jun 2021 19:07:35 -0000
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@xxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> On Fri, 2021-06-18 at 18:41 +0000, Alan Painter alan.painter@xxxxxxxxx
> 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

Current Thread