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

RE: [xsl] Problem Counting number of Keys.


Subject: RE: [xsl] Problem Counting number of Keys.
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Wed, 22 Sep 2004 14:34:01 +0100

> 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

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--


Current Thread