[xsl] Is there any multiple if exression (not xsl:if) available in xpath/xslt2 ?

Subject: [xsl] Is there any multiple if exression (not xsl:if) available in xpath/xslt2 ?
From: Karl <call14@xxxxxxxxx>
Date: Thu, 20 Jul 2006 10:49:37 +0100 (BST)
I have an xml having some 'n' number of <section>'s + 3 OPTIONAL
elemts <ref>, <ack> and <app>, which must appear in that order. 
Though my actual reqmt is to generate html pages in that names with
links from every page, what in essence i would prefer to get is

1. section 1 
2. section 2
...
n. section n 
n+1 ref
n+2 ack
n+3 app

The problem is if ref is not present, it will be
n. section n
n+1 ack
n+2 app

or if ack not there
n+1 ref
n+2 app

and the combination can be anything as those 3 elemts are optional. I
can have many <xsl:if>s to find and get what i want. But is there a
elegant solution or expression (can be even xslt 2/xpath 2) that will
reduce multiple if stmts?

Also, i need to count Total num of pages. Is there any expr like 
Total pages = <xsl:value of select"count(//section) + if(ref) add 1 +
if (ack) add 1 + if(app) add 1"/> 

Thanks
karl


		
___________________________________________________________ 
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html

Current Thread