[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Selecting nodes with the same attribute value
You are trying to do grouping: in XSLT 2.0, use xsl:for-each-group. For XSLT 1.0, consult http://www.jenitennison.com/xslt/grouping Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: David Trallero [mailto:ditiem@xxxxxxxxx] > Sent: 09 February 2006 16:36 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Selecting nodes with the same attribute value > > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|