Subject: Re: [xsl] Only first rows (after the sort) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 15 Aug 2006 10:51:44 -0400 |
</xsl:if> </xsl:template>
Cheers, Wendell
Hi,
I have a problem transforming an XML file to the desired table structure. I hope someone can help me.
Here is the XML file I use: <example> <category>XML</category> <year>2005</year> </example> <example> <category>XSL</category> <year>2005</year> </example> <example> <category>XSL</category> <year>2006</year> </example> <example> <category>XML</category> <year>2005</year> </example> ...
Here is how the table should look eventually: Catagory Year XML 2005 XSL 2005 XSL 2006 ...
My current XSL:
<xsl:for-each select="example"> <xsl:sort select="category"><xsl:sort select="year"> <tr><td><xsl:value-of select="./category"></td><td><xsl:value-of select="./year"></td></tr> </xsl:for-each>
This results in: Catagory Year XML 2005 XML 2005 XSL 2005 XSL 2006 ...
So what I'm trying to do is to skip rows when the combination of category and year are identical (skip the duplicates). I've tried to put it in an <xsl:if> combined with <xsl:variable> construction, but I just can't get it right. Does anyone have an idea?
Kind regards, Dennis
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Only first rows (after the so, Stinissen, Dennis | Thread | Re: [xsl] Only first rows (after th, Mukul Gandhi |
Re: [xsl] Selecting the first node , Wendell Piez | Date | RE: RE: [xsl] Selecting the first n, cknell |
Month |