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

RE: Problem Counting number of Keys.

Subject: RE: Problem Counting number of Keys.
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Wed, 22 Sep 2004 14:34:01 +0100
xsl counting records
> 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

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.