Subject: Re: [xsl] Variable value change based on condition From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx> Date: Tue, 5 Oct 2010 08:18:45 -0700 (PDT) |
Thank you all. Let me try this. --- On Tue, 10/5/10, David Carlisle <davidc@xxxxxxxxx> wrote: > From: David Carlisle <davidc@xxxxxxxxx> > Subject: Re: [xsl] Variable value change based on condition > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Cc: "sudheshna iyer" <sudheshnaiyer@xxxxxxxxx> > Date: Tuesday, October 5, 2010, 10:51 AM > 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> > > > ________________________________________________________________________ > 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@xxxxxxxxxxxxxxxxxxxxxx> > --~--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Variable value change bas, David Carlisle | Thread | [xsl] Collect all the truncated fie, sudheshna iyer |
Re: [xsl] Variable value change bas, David Carlisle | Date | Re: [xsl] Random number, sudheshna iyer |
Month |