xsl-list
[Top] [All Lists]

RE: Problem Counting number of Keys.

2004-09-22 06:34:01


I am trying to create a 'Grouped' output from the following 
XSML/XSLT and I 
need to count the number of unique records in the group.

The output should look like:-

Contact               # of Visits      Account
----------------------------------------------------------
johnson, johnny        2             account 1 sub
bragg, billy               1              account2

Count = 2 <-----this is the value I am after, however when I 
try <xsl:value-of 
select="count(key('keyContactGUID',//objectid.contactid))"/>
it returns 5.

What am I doing wrong???

It's a question of brackets, you want to get all <objectid.contactid>
and then select the first, so use:

(//objectid.contactid)[1]

cheers
andrew 


<Prev in Thread] Current Thread [Next in Thread>