[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:05:42 +0100
xsl if any
in answer to the question in the subject line
<xsl:choose>
  <xsl:when>...
  <xsl:when>...
  <xsl:otherwise>...

would seem to be what you are looking for.


> 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. 

It's not clear why you need any if test at all, what's wrong with

<xsl:apply-templates select="section,ref,ack,app"/>

which will just convert those sections and the optional elements igf
they are there and not if they are not?

  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"/> 

select="count(//section,ref,ack,app)"

or in xslt1

select="count(//section|ref|ack|app)"

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.