[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Only first rows (after the sort)
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
|
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
|