|
Subject: Re: [xsl] Problem with conditional parameter in call-template From: Gavin Corfield <gavin@xxxxxxxxxxxxxxxxxx> Date: Tue, 04 Sep 2001 10:10:09 +0800 |
Hi Carlos, if tipus is the only conditional parameter you can simplify
this by doing:
> <xsl:call-template name='entradaTexte'>
> <xsl:with-param name='id'>
> <xsl:value-of select='@id'/>
> </xsl:with-param>
> <xsl:with-param name='valor'>
> <xsl:value-of select='valor'/>
> </xsl:with-param>
> <xsl:with-param name='tipus'>
> <xsl:call-template name="set-tipus" />
> </xsl:with-param>
> </xsl:call-template>
>
<xsl:template name="set-tipus">
<xsl:choose>
<xsl:when test="name(.)='contraseyna'>password</xsl:when>
<xsl:otherwise>text</xsl:otherwise>
</xsl:choose>
</xsl:template>
then just add conditions as necessary.
hope that helps
gavin
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Problem with conditional para, Carlos Fragoso Maris | Thread | Re: [xsl] Problem with conditional , Jeni Tennison |
| [xsl] Problem with conditional para, Carlos Fragoso Maris | Date | [xsl] Error message when match=$var, timw |
| Month |