Subject: Re: [xsl] I love programs that output programs From: "Michael Kay michaelkay90@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 21 Jan 2025 21:06:56 -0000 |
> On 19 Jan 2025, at 22:47, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Sun, 2025-01-19 at 22:22 +0000, Joel Kalvesmaki > director@xxxxxxxxxxxxx wrote: >> Just to say that I frequently use multiple modes on one template. > > Hmm, > > <xsl:mode name="sago" base="tapioca"> > . . . > </xsl:mode> > to be the equivalent of extracting xsl:mode[@name = "tapioca"] as if > imported from an external file (for precedence purposes) ? > <xsl:mode name="x"> <xsl:template match="a"/> <xsl:template match="b"/> <xsl:template match="c"/> </xsl:mode> is essentially equivalent to <xsl:mode name="x"/> <xsl:include href="templates.xsl"/> where templates.xsl contains the three template rules and specifies default-mode="x". There are probably a few minor differences, I wouldn't be 100% confident it's the same in all edge cases. The main difference is that enclosing modes are only usable where all the enclosed template rules apply exclusively to that mode, and all template rules that apply to that mode are enclosed. The main idea is that you can see "at a glance" exactly what the mode does. Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] I love programs that outp, Liam R. E. Quin liam | Thread | Re: [xsl] I love programs that outp, BR Chrisman brchrism |
Re: [xsl] Running XSLT from Python, dvint dvint@xxxxxxxx | Date | [xsl] Stylesheet works in oXygen fa, dvint@xxxxxxxxx |
Month |