Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Counting the number of elements in a variable before looping


Subject: Re: [xsl] Counting the number of elements in a variable before looping
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Wed, 27 Jun 2007 18:27:48 +0200

sudheshna iyer wrote:
I need to find out how many elements are present in
the variable "computers" in the below for-each.

<xsl:for-each select="$computers">

I need to display a message to the user based on the
number of elements that are present.

Is there any variable called count for doing the above?

There is a method called count <http://www.w3.org/TR/xpath#function-count> that you can use:
count($computers)



--


	Martin Honnen
	http://JavaScript.FAQTs.com/


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor