[Home] [By Thread] [By Date] [Recent Entries]
On 05/10/2010 15:38, sudheshna iyer wrote:
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.. so there were no variables at all, you meant "elements" I doubt anyone would have guessed that. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <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>
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|

Cart



