Subject: Re: [xsl] Trying to sort node set while tagging specific nodes in it From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 27 Jul 2005 16:35:43 +0100 |
google for muenchian grouping, then <xsl:key name="a" match="rec" use="name"/> <xsl:template name="root"> <root> <xsl:for-each select="rec[generate-id()=generate-id(key('x',name))]"> <xsl:sort select="name"/> <xsl:for-each select="key('x',name)"> <xsl:sort data-type="number" select="year"/> <rec> <xsl:if test="position()=1"> <xsl:attribute name="tag">latest</xsl:attribute> </xsl:if> <xsl:copy-of select="*"/> </rec> </xsl:for-each> </xsl:for-each> </root> </xsl:template> ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Trying to sort node set while, Stan | Thread | [xsl] how to match true and false a, Christian Rasmussen |
[xsl] Trying to sort node set while, Stan | Date | [xsl] how to match true and false a, Christian Rasmussen |
Month |