This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Variable value based on condition[URGENT]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]