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
be sure.
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
<xsl:variable name="variable3"
select="($var3,$var2,$var1)[not(.='')][1]"/>
on xslt1 if you could use
<xsl:variable name="variable3" >
<xsl:choose>
<xsl:when test=not($var3='')"><xsl:value-of select="$var3"/></xsl:when>
<xsl:when test=not($var2='')"><xsl:value-of select="$var2"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$var1"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
David
________________________________________________________________________
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.
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--