| Subject: Re: [xsl] Shorthand. From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Wed, 25 Jul 2007 17:58:22 +0100 | 
Hey there, I have a template for creating ajax links:
<xsl:template name="a"> <xsl:with-param name="href" /> <xsl:with-param name="text" /> <a href="{$href}" onClick="showData('{$href}');return false;"><xsl:value-of select="$text" /></a> </xsl:template>
is there some shorter way to use this (XSL 1.0) template than...
<xsl:call-template name="a"> <xs:param name="href" select="'x'"/> <xs:param name="text" select="'y'"/> </xsl:call-template>
<xsl:template name="a">
 <a href="{@x}" .....>
   <xsl:value-of select="y"/>
 </a>
</xsl:template>...as the current node is the same within the named template as it is when you call the named template.
cheers andrew -- http://andrewjwelch.com
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Shorthand., Abel Braaksma | Thread | Re: [xsl] Shorthand., Steve | 
| RE: [xsl] Shorthand., Angela Williams | Date | RE: [xsl] Shorthand., Angela Williams | 
| Month |