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

Antw: counting nodes before and aften an specific one

Subject: Antw: counting nodes before and aften an specific one
From: "Markus Frommherz" <Markus.Frommherz@xxxxxx>
Date: Tue, 26 Nov 2002 10:53:11 +0100
Antw:  counting nodes before and aften an specific one
Hi Ani,
you may use an expression in your count() statement.

cheers,
markus 


<xsl:template match="form-tab">
	<xsl:variable name="count_inactive">

<!-- here we go -->
	<xsl:value-of select="count(tab[@active !='1'])"/>

	</xsl:variable>
	<xsl:message>
	there are
	<xsl:value-of select="$count_inactive"/>
	inactive entries
	</xsl:message>
</xsl:template>

>>> aniceto@xxxxxxxxxxxxx 26.11.2002  10.34 Uhr >>>
Hi xsl people.

xml sample
<form-tab>
  <tab active="0" name="GENERAL"/>
  <tab active="0" name="CONTABLES"/>
  <tab active="1" name="NOTAS"/>
  <tab active="0" name="DOCUMENTOS"/>
  <tab active="0" name="NOTAS"/>
  <tab active="0" name="RELACIONES"/>
</form-tab>

how can I count the nodes before the one @active=1
ant the ones after, assuming there is only one active

any idea?

thanks in advance
Ani

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



 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.