RE: [xsl] counting matches between list items

Subject: RE: [xsl] counting matches between list items
From: "kfricovsky" <kfricovsky@xxxxxxxxxxx>
Date: Wed, 20 Jun 2001 11:51:57 -0400


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Beck,
Sent: Wednesday, June 20, 2001 11:40 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] counting matches between list items

I'm new to XSL, so this might be a simple question. I'm trying to
compare the items in two lists using XSL to check if an item at a
certain position in the two lists matches. For example, the lists below
have 1 matching item.

			<ITEM type="dog" /> 
			<ITEM type="cat" /> 
			<ITEM type="fish" /> 
			<ITEM type="dog" /> 
			<ITEM type="fish" /> 
			<ITEM type="cat" /> 
I've tried using count() <xsl:variable name="listMatches"
ST_B/ITEMS/attribute::type])"/> But count() does not take the position
of the elements into account. I can't figure out how to accumulate a
count using <xsl:for-each>. If anyone has any suggestions, please let me
- Matthew 

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread