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

Variable value based on condition[URGENT]

Subject: Variable value based on condition[URGENT]
From: Mailer Mailer <maillistboxes@xxxxxxxxx>
Date: Sun, 2 Dec 2001 01:06:19 -0800 (PST)
condition variable value javascript
Hi All,

XSL does not allow variable reassignment. I want to
assign a value to a variable based on a condition. Is
there any workaround for this. If this is possible
anyhow then it will save my 100s of lines of code,
complexity and add to performance as well.

The condition is:
if the count(preceding-sibling::Event) = 0
then value = 1
else If the count(preceding-sibling::Event) > 5
then value = 6
else value = count(preceding-sibling::Event)

If I read it through the xml file

document('names.xml')/Count/*[count(preceding-sibling::Event)
+ 1]

'names.xml' having the appropriate value at
appropriate tag, but in this case how do I handle the
greater than 5 condition?

Please help

Thanks
Deep

__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.