[XSL-LIST Mailing List Archive Home]
Re: [xsl] Variable value change based on condition
Subject: Re: [xsl] Variable value change based on condition|
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 05 Oct 2010 14:09:11 +0100
On 05/10/2010 13:59, sudheshna iyer wrote:
Can this be achieved in xslt 1.0?
You just repeated your initial question.
XSLt doesn't have "inout variables" and "output variables" I'm guessing
that you mean, respectively, parameters and variables, but it's hard to
variables always have a value if declared so you need to say what value
you want for each of your three variables.
I'm guessing that you want, for variable3 something like the first of
input3,input2,input1 that is not empty.
In XSLT2 that would be
on xslt1 if you could use
<xsl:variable name="variable3" >
<xsl:when test=not($var3='')"><xsl:value-of select="$var3"/></xsl:when>
<xsl:when test=not($var2='')"><xsl:value-of select="$var2"/></xsl:when>
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.