Subject: Re: problem with Passing Parameters to Templates
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 22 Jan 2001 15:58:55 GMT
|
<xsl:if test="$node-element">
<xsl:value-of select="$node-element" />
</xsl:if>
again, a spurious if. You _never_ need do that. The above is
equivalent to
<xsl:value-of select="$node-element" />
<xsl:template name="opt_template">
<xsl:param name="node"></xsl:param>
<xsl:variable name="node-element"
select=".//*[local-name() = $node]" />
<xsl:if test="$node-element">
<xsl:value-of select="$node-element" />
</xsl:if>
</xsl:template>
is just
<xsl:template name="opt_template">
<xsl:param name="node"/>
<xsl:value-of select=".//*[local-name() = $node]" />
</xsl:template>
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|