Re: [xsl] I love programs that output programs

Subject: Re: [xsl] I love programs that output programs
From: "Joel Kalvesmaki director@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Jan 2025 22:22:37 -0000
Just to say that I frequently use multiple modes on one template. Yes, I can do the conditional work through tunnel parameters, but sometimes I prefer multiple modes to handle that, since it reduces number of lines (and therefore potential clutter) in my XSLT code, and it helps me think about patterns and types of template modes. I've not done enough introspection to understand why and when I prefer multiple modes to tunnel parameters. All I can say is that I'm glad I have both options available.

The third option, the new enclosed mode of XSLT 4, is very useful, and I'll be using it as well, but not exclusively.

Joel

Recently I've started applying multiple modes to one template. This
has simplified my stylesheets where I have several modes going on.

I would be interested in your use case for having a template rule in multiple modes. It's something I have very rarely seen a need for. I suspect that where you are using this, I would probably be using tunnel parameters.

Michael Kay
Saxonica


--
Joel Kalvesmaki
Director, Text Alignment Network
http://textalign.net

Current Thread