[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Variable value change based on condition

Subject: Re: Variable value change based on condition
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Tue, 5 Oct 2010 08:18:45 -0700 (PDT)
Re:  Variable value change based on condition
Thank you all. Let me try this. 



--- On Tue, 10/5/10, David Carlisle
<davidc@xxxxxxxxx> wrote:

> From: David Carlisle <davidc@xxxxxxxxx>
>
Subject: Re:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.