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

Counting non-empty elements

Subject: Counting non-empty elements
From: Sergej <dibona@xxxxxxxxxxxxx>
Date: Wed, 13 Mar 2002 15:06:58 +0100
non empty tags
Hello everybody,

sorry but I am a novice in this field and probably my question has an easy solution, but I cannot find it.
I'd like to write a number near non-empty descriptions as shown in the following code:
<xsl:template match="itemSet">
<tr>
<td>
<xsl:if test="normalize-space(itemDesc)">
<xsl:number level="multiple" format="1. "/>
<xsl:value-of select="itemDesc"/>
</xsl:if>
</td>
<td>
....
</td>
</tr>
....
</xsl:template>


The problem is that also the empty elements are taken into account even if the number does not appear. In other words I get something like

1. Description 1        xxxx
                        xxxx
3. Description 3        xxxx
                        xxxx
5. Description 4        xxxx

and I'd like '3.' to be '2.' and '5.' to be '3.'

Does anybody know how should I do. Thanx a lot for your help.

Sergej



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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.