This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Using mode to override templates


>> 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:

Arg, correction, the otherwise isn't needed; that code should always be
fired...

  <xsl:choose>
   <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:choose>
 <xsl:apply-templates/>	<!-- common templates -->


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]