|
Subject: Re: [xsl] use choose in call-templates not possble From: Michael Kay <mike@xxxxxxxxxxxx> Date: Thu, 10 May 2012 14:20:21 +0100 |
You can also use if-then-else in select (XPath/XSLT 2.0).And even in 1.0, this is a case where the "Carlisle conditional" may be useful:
<xsl:call-template name="translateDcml"> <xsl:with-param name="factor" select="if (FCDecimalPlace != '') then FCDecimalPlace else LCDecimalPlace"/> </xsl:call-template>
<xsl:variable name="f" select="boolean(FCDecimalPlace != '')"/>
<xsl:call-template name="translateDcml">
<xsl:with-param name="factor"
select="FCDecimalPlace[$f] | LCDecimalPlace[not($f)]"/>
</xsl:call-template>Michael Kay Saxonica
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] use choose in call-templa, Jakub Malý | Thread | Re: [xsl] use choose in call-templa, Michel Hendriksen |
| Re: [xsl] use choose in call-templa, Liam R E Quin | Date | Re: [xsl] use choose in call-templa, Michel Hendriksen |
| Month |