RE: [xsl] Using mode to override templates

Subject: RE: [xsl] Using mode to override templates
From: "Hunsberger, Peter" <Peter.Hunsberger@xxxxxxxxxx>
Date: Mon, 1 Jul 2002 10:02:24 -0500
> Obviously, apply-templates with a mode will only use templates with a
> matching mode (and not fire all the templates that are common to both
> and therefore would not have a mode) - how do I overcome this?

Andrew,
how about just making the non print templates and the common code explicit?
IE:

 <xsl:when test="$print = 'yes'">
   <xsl:apply-templates mode="print"/>
 </xsl:when>
 <xsl:when test="$print != 'yes'">
   <xsl:apply-templates mode="not_print"/>
 </xsl:when>
 <xsl:otherwise>
   <xsl:apply-templates/>	<!-- common templates -->
 </xsl:otherwise>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread