Re: [xsl] How do I count the number of elements in a key ?

Subject: Re: [xsl] How do I count the number of elements in a key ?
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 6 Oct 2006 15:03:42 +0100
On 10/5/06, David Carlisle <davidc@xxxxxxxxx> wrote:

> How do I count the number of elements in the key "systems" seeing that That's the basis of the "muenchian grouping" technique: count(/inventory/row/serial[generate-id()=generate-id(key('systems',.))])

I think DC missed off a [1] there...


count(/inventory/row/serial[generate-id()=generate-id(key('systems',.)[1])])

It's also worth mentioning
count(distinct-values(/inventory/row/serial)) if you are using XSLT
2.0

cheers
andrew

Current Thread