RE: [xsl] Exclude a template from a stylesheet depending on parameter

Subject: RE: [xsl] Exclude a template from a stylesheet depending on parameter
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 9 Sep 2003 10:00:37 +0100
In XSLT 2.0 you can do

<xsl:template match="xxxxxx[$param]">

and if $param is false, it won't be matched.

In XSLT 1.0, you can't have any references to variables in the match
pattern and the mode, priority, etc are also fixed at compile time.

In theory you could do

<xsl:template match="xxxxx[document('param.xml')/p='zzz']"

but I'm not sure I would recommend it. 

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Tim Müller-Seydlitz
> Sent: 09 September 2003 08:24
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Exclude a template from a stylesheet depending 
> on parameter
> 
> 
> Hi all,
> I would like to be able to exclude a template from a stylesheet 
> depending on a parameter.
> How could I do so?
> Could I put the parameter in the priority?
> Could I put the parameter in the mode?
> Thanks
> Tim
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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


Current Thread