[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: for-each-group
> <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/
|
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
|