Re: count of element occurrences

Subject: Re: count of element occurrences
From: Paul Tchistopolskii <paul@xxxxxxx>
Date: Tue, 19 Sep 2000 06:58:07 -0700
----- Original Message ----- 
From: Sebastian Rahtz 

> I want a list of all the elements used in my document, with a count of
> how many times they occur. My Muenchian solution is appended, but its
> fairly ugly. Can someone suggest a more elegant method?

I don't know about elegancy, but I can suggest 
a simple solution based on your test6 ;-)

Consider pipe of 3 transformations:

Transformation 1. ( Produce flat list of elements ).


<xsl:template match="/">

<xsl:template match='*'>
<xsl:element name="{name()}"/>


Transformation 2. sort

So now we have flat file which is sorted - so it is 
ready for:

Transformation 3. Is 'flat-hierarchy' grouping which 
I wrote for your test6.


 XSL-List info and archive:

Current Thread