<xsl:for-each-group select="/products" group-by="product">
<product><xsl:value-of select="product" /></product>
</xsl:for-each-group> </products>
What am I doing wrong? Basically I want something similar to
'GROUP BY' in SQL.
You've only got one "products" element, so grouping it isn't going to be
very interesting...
I think there's a tendency for people coming from SQL to use the name of a
wrapper element as if it's the name of a table and thus refers to the set of
elements it contains. You need to clear your head of SQL (and most other
languages) to use XSLT/XPath successfully.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--