[xsl] Selecting nodes with the same attribute value

Subject: [xsl] Selecting nodes with the same attribute value
From: David Trallero <ditiem@xxxxxxxxx>
Date: Thu, 9 Feb 2006 17:36:28 +0100
I would like to make a call to <xsl:apply-templates select="nodes with
the same name"/>.

To understand this better, we could think about email. In an email box
there are several
emails from several users. When clicking in "Order by Date" or "Order
by Name" all emails
are grouped by that "attribute". I would exactly to do that:

If we have:
<email>
  <name>N1</name>
  ....
</email>

<email>
  <name>N1</name>
  ....
</email>

<email>
  <name>N2</name>
  ....
</email>

<email>
  <name>N2</name>
  ....
</email>

<email>
  <name>N2</name>
  ....
</email>

<email>
  <name>N3</name>
  ....
</email>

I would like to have the tree instantiated in

<xsl:template select="inbox/emails/name">

</xsl:template>

to
2 emails of N1
3 of N1
1 of N3

Is that possible?

Thans in Advance,
David

Current Thread