How to tell the number of distinct attribute values?

Subject: How to tell the number of distinct attribute values?
From: "Wang, Yufei" <yufeiwang1@xxxxxxxx>
Date: Wed, 22 Mar 2000 17:58:13 -0500
Hi,  I would like to have a stylesheet that translates an XML document from:

<group>
<group>
			<item period="1998">6261</item>
			<item period="1999">6738</item>
		</group>
		<group>
			<item period="1998">2686</item>
			<item period="1999">3356</item>
		</group>
		<group>
			<item period="1998">3575</item>
			<item period="1999">3382</item>
		</group>
</group>

to:

<group>
<group period="1998">
			<item period="1998">6261</item>
			<item period="1998">2686</item>
			<item period="1998">3575</item>
		</group>
		<group period="1999">
			<item period="1999">6738</item>
			<item period="1999">3356</item>
			<item period="1999">3382</item>
		</group>
</group>

The rule is to re-group the items according to their @period value.
However, I could not figure out a way to tell how many distinct @period
values there are.

Any suggestions?

Thx,
Yufei
*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.         
*****************************************************************************


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread