[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: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 05 Oct 2010 11:09:03 +0100
Re:  Variable value change based on condition
On 05/10/2010 10:39, sudheshna iyer wrote:
I need a variable whose value can be changed based on the if conditions.


That's basically saying that you need to be able to pass c syntax to a XSLT compiler. That doesn't work.


The expressive power of declarative languages in which variables do not change there values once bound is the same as that of imperative languages with mutable variables. So you can't "need" to change the value of a variable.

If you said what transform you need to do someone wiould most likely show you how to do it without changing the value of a variable, or as is often the case, without using a variable at all.


> Conditions: > If all the 3 input variables are present,

Variables in XSLT have lexical scope and always have a value within that scope. i see though you say

> variable's presence (not empty).

Not sure here whether you mean empty node set or empty string,


> If there are only two input variables present (inputVar1, inputVar2), > map inputVar1 -> outputVar1 and map inputVar2 -> outputVar1.



this seems to say you want to set outputVar1 to being both $inputVar1 and $inputVar2 ?






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. ________________________________________________________________________


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.