Subject: Re: [xsl] Variable value change based on condition From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 05 Oct 2010 15:51:38 +0100 |
Team, thank you for your patience. I complete understand that converting java code to xslt doesn't make much sense. But tech change required this, which I don't have control on. Since I came from java background, it is becoming harder for me..
<xsl:template match="InputXml"> <OutputXml> <xsl:choose> <xsl:when test="InputXmlValue3='' and InputXmlValue2=''"> <outputTempVar1></outputTempVar1> <outputVar1><xsl:value-of select="InputXmlValue1"/></outputVar1> <outputVar2></outputVar2> </xsl:when> <xsl:when test="InputXmlValue3=''"> <outputTempVar1></outputTempVar1> <outputVar1><xsl:value-of select="InputXmlValue1"/></outputVar1> <outputVar2><xsl:value-of select="InputXmlValue2"/></outputVar2> </xsl:when> <xsl:otherwise> <outputTempVar1><xsl:value-of select="InputXmlValue1"/></outputTempVar1> <outputVar1><xsl:value-of select="InputXmlValue2"/></outputVar1> <outputVar2><xsl:value-of select="InputXmlValue3"/></outputVar2> </xsl:otherwise> </xsl:choose> </OutputXml> </xsl:template> </xsl:stylesheet>
________________________________________________________________________ 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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Variable value change bas, sudheshna iyer | Thread | Re: [xsl] Variable value change bas, sudheshna iyer |
RE: [xsl] Variable value change bas, sudheshna iyer | Date | Re: [xsl] Variable value change bas, sudheshna iyer |
Month |