Re: [xsl] I love programs that output programs

Subject: Re: [xsl] I love programs that output programs
From: "dvint dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Jan 2025 19:48:00 -0000
Recently I've started applying multiple modes to one template. This has
simplified my stylesheets where I have several modes going on.B  Will that be
supported with this new mode element?B This new element will make it easier to
deal with stylesheets with an editor like oxygen where you can collapse
content. Currently I try and group templates with modes together and maybe a
start and end comment but that doesn't help with minimizing content...danSent
from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: "Liam R. E. Quin
liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 1/19/25
11:05 AM  (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] I
love programs that output programs On Sun, 2025-01-19 at 11:16 +0000, Dave
Pawson dave.pawson@xxxxxxxxxxxxxx:> Modes:> B  Now 'enclosing modes'> Am I the
only one thinking xslt4 is miles away (and of less use due> complexity)B  from
XSLT?This change is actually a simplification.You can now write<xsl:mode
name="xref-insert-titles" on-no-match="shallow-copy">B B  <xsl:template
match="xref" ...>B B B B  . . .B B  </xsl:template>B B  <xsl:template
match="qv" ...>B B B  . . .B B  </xsl:template></xsl:mode>and know there are
no other templates with that mode,and also know (as with XSLT 3) that the
identity templateis built in to the mode for nodes that arenbt
explicitlymatched.When using modes to simulate multiple transformations in one
XSLTexecution, itbs common to see lots of templates scattered about thathave
a mode="...." attribute, so this makes it easier to understand andmaintain
stylesheets.So this can help the fuzzy space between single transformation and
XSLTthat calls transform() and XSLT that creates XSLT on the fly for somelater
XSLT process.Usage is optional, you can still scatter your templates instead
ofputting them in a mode wrapper.I've wanted this since XSLT 1 days :)And,
thank you Mike for confirming that itbs enforced.B  The specs arein flux and
the meetings are at a difficult time for me.-- Liam
Quin,B 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:
B http://www.fromoldbooks.org

Current Thread