This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: referencing a param inside a template
- From: "Stuart Celarier" <stuart at ferncrk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 20 May 2002 15:49:25 -0700
- Subject: RE: [xsl] referencing a param inside a template
- Reply-to: xsl-list at lists dot mulberrytech dot com
Jeff,
Instead of
<input ... value='$ID'>
you need to use an "attribute value template" [1] which is delimited by
curly braces like this:
<input ... value='{$ID}'>.
Where you require greater control, such as the conditional inclusion of
an attribute or a complex evaluation, you can use the <xsl:attribute>
element [2], as in
<input>
<xsl:attribute name='value>
<xsl:value-of select='$ID'/>
</xsl:attribute>
</input>
Cheers,
Stuart
[1] http://www.w3.org/TR/xslt#dt-attribute-value-template
[2] http://www.w3.org/TR/xslt#creating-attributes
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list