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

Re: Is there any multiple if exression (not xsl:if) a

Subject: Re: 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
thanksgiving sale dc
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

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.