[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Urgent: Grouping attributes together
Subject: RE: [xsl] Urgent: Grouping attributes together From: Jarno.Elovirta@xxxxxxxxx Date: Wed, 18 Jun 2003 09:41:35 +0300 |
FFFAQ, > I need help to write an XSLT file for converting first.xml to > second.xml > where the attribute values are grouped Did you have a look at the FAQ or Jeni's pages on grouping? <xsl:key name="class" match="student" use="@class"/> <xsl:template match="school"> <xsl:copy> <xsl:for-each select="student[generate-id(.) = generate-id(key('class', @class))]"> <Section class="A"> <xsl:apply-templates select="key('class', @class)"/> </Section> </xsl:for-each> </xsl:copy> </xsl:template> <xsl:template match="student/@class"/> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> Cheers, Jarno XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Urgent: Grouping attribut, Michael Kay | Thread | RE: [xsl] Urgent: Grouping attribut, Jarkko Moilanen |
[xsl] XML XSL Question about includ, Anton Wardaschko (PA | Date | RE: [xsl] XML XSL Question about in, Jarno . Elovirta |
Month |
Keywords