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

Subject: Re: [xsl] Is there any multiple if exression (not xsl:if) available in xpath/xslt2 ?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 20 Jul 2006 11:14:03 +0100
MK> If you do
MK> 
MK> <xsl:apply-templates select="section, ref, ack, app"/>
MK> 
MK> then the sections will be processed in that order, and position() used
MK> within the relevant templates will give you consecutive numbering. Also
MK> count(section|ref|ack|app) will give you the right total.
MK> 


DC> It's not clear why you need any if test at all, what's wrong with
DC> 
DC> <xsl:apply-templates select="section,ref,ack,app"/>
DC> 
DC> which will just convert those sections and the optional elements igf
DC> they are there and not if they are not?
DC> 
DC>   Also, i need to count Total num of pages. Is there any expr like 
DC>   Total pages = <xsl:value of select"count(//section) + if(ref) add 1 +
DC>   if (ack) add 1 + if(app) add 1"/> 
DC> 
DC> select="count(//section,ref,ack,app)"
DC> 
DC> or in xslt1
DC> 
DC> select="count(//section|ref|ack|app)"
DC> 

Sometimes I wonder if we should take turns, you do a week, then I do a
week:-)

David

Current Thread