This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
variable value in "select" attribute
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] variable value in "select" attribute
- From: "Pouliot, Brian R." <brpouliot at tasc dot com>
- Date: Fri, 5 Jan 2001 19:02:02 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
I need to insert a variable value in the middle of a "select" string. I
have variables $day1date, $day2date, etc...and I am passing a parameter $n
to a template to define the numeric portion of the variable name. I want to
be able to fill in the numeric value on the fly like this:
<xsl:value-of select="\$day$ndate"/>
I know the syntax is wrong. I need "$day" to be treated as a string, $n to
be treated as a number, and "date" to be treated as a string. I cannot use
the concat() function, because <xsl:value-of
select="concat('$day',$n,'date')/> simply returns "$day1date". I need it to
return the VALUE of $day1date.
Any ideas?
Thanks,
Brian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list