|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem with conditional parameter in call-templat
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






