|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Assigning values to variables
You can't assign declare and assign a value as two different processes. You have to assign a value when you declare it and you can't reassign a value to a declared variable. -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Haque, Suraiya Sent: Monday, August 20, 2001 8:32 AM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: Assigning values to variables How do you assign values to a variable once they've already been declared? I have a simple template as follows, but I can't assign a value to LastDate as I'd like: <xsl:variable name="LastDate">None</xsl:variable> <xsl:template name="DoTitle"> <xsl:param name="Date">N/A</xsl:param> <xsl:param name="Time">N/A</xsl:param> <xsl:variable name="CurrentDate" select="concat($Date,$Time)"/> <xsl:if test="$LastDate = 'None'"> <td>First<xsl:value-of select="$LastDate"/>/<xsl:value-of select="$CurrentDate"/></td> </xsl:if> <xsl:if test="$CurrentDate = $LastDate"> <td><xsl:value-of select="$Date"/>:<xsl:value-of select="$Time"/></td> </xsl:if> <xsl:if test="$CurrentDate != $LastDate"> <td></td> </xsl:if> </xsl:template> Thanks for any help! XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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
|

Cart








