Subject: Re: Using mode to override templates
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 02 Jul 2002 11:04:10 +0200
|
What about replacing all occurances of
<xsl:apply-templates/>
with
<xsl:apply-templates select="." mode="choose"/>
and add a template
<xsl:template match="*" mode="choose">
<xsl:choose>
<xsl:when test="$print = 'yes'">
<xsl:apply-templates mode="print"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Should work ;-)
Regards,
Joerg
Andrew Welch wrote:
Peter,
For this to work I would need to replace all occurances of:
<xsl:apply-templates/>
with:
<xsl:choose>
<xsl:when test="$print = 'yes'">
<xsl:apply-templates mode="print"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
Not such a big deal I suppose, especially if I isolate all the cases
where a call to a print template is possible.
I guess I was just hoping for some kind of workaround.
cheers
andrew
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@xxxxxxxxx
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Using mode to override templates
- Andrew Welch - Mon, 1 Jul 2002 10:17:36 -0400 (EDT)
- <Possible follow-ups>
- Hunsberger, Peter - Mon, 1 Jul 2002 11:06:38 -0400 (EDT)
- Hunsberger, Peter - Mon, 1 Jul 2002 11:28:13 -0400 (EDT)
- Andrew Welch - Tue, 2 Jul 2002 04:48:52 -0400 (EDT)
- Joerg Heinicke - Tue, 2 Jul 2002 05:02:06 -0400 (EDT) <=
- Andrew Welch - Tue, 2 Jul 2002 06:44:33 -0400 (EDT)
- Hunsberger, Peter - Tue, 2 Jul 2002 09:49:47 -0400 (EDT)
- Marrow - Wed, 3 Jul 2002 10:35:34 -0400 (EDT)
|
|