[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

WITH-PARAM with node as argument?

Subject: WITH-PARAM with node as argument?
From: Andreas Schlegel <schlegelaw@xxxxxx>
Date: Fri, 25 Apr 2003 18:11:33 +0200
with param name
Hi,

I would like to write a with-param statement with a node as argument and handle this node in a template. But I don't know if it is possible or even what is the syntax. The following example is my current code which has to much arguments (IMHO). It would be great if I could reduce it to only 1 argument.

<xsl:call-template name="textfield">
<xsl:with-param name="label" select="comp/attribute[@name='country']/@label"/>
<xsl:with-param name="name" select="comp/attribute[@name='country']/@name"/>
<xsl:with-param name="size" select="comp/attribute[@name='country']/@size"/>
<xsl:with-param name="value" select="comp/attribute[@name='country']/@value"/>
</xsl:call-template>



<xsl:template name="textfield">
<xsl:param name="label"/>
<xsl:param name="name"/>
<xsl:param name="size"/>
<xsl:param name="value"/>
<tr>
<th align="left"><xsl:value-of select="$label"/></th>
<td align="left" colspan="1">
<xsl:element name="input">
<xsl:attribute name="type">text</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
<xsl:attribute name="size"><xsl:value-of select="$size"/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="$value"/></xsl:attribute>
</xsl:element>
</td>
</tr>
</xsl:template>



Greetings, Andreas



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.