Subject: [xsl] for-each-group From: Robert C Corsaro <rcorsaro@xxxxxxxxxxx> Date: Tue, 27 Mar 2007 14:24:48 -0500 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm trying to transform the following XML: <products> <product>1</product> <product>1</product> <product>1</product> <product>1</product> <product>1</product> <product>1</product> <product>1</product> <product>2</product> <product>2</product> <product>2</product> <product>2</product> <product>2</product> <product>2</product> <product>2</product> <product>2</product> <product>2</product> </products> to: <products> <product>1</product> <product>2</product> </products> using: <products> <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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGCW+AkAu83kdgE3MRArfOAKCu2SzjWaqQt9GtHt7N/XielwUCZACdGHSg YKXjGT0JUVuxEcc/ntWPInI= =qeAN -----END PGP SIGNATURE-----
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Multiple String Replaceme, Ignacio Garcia del C | Thread | Re: [xsl] for-each-group, Jeni Tennison |
Re: [xsl] Adding Text to "Document , siarom egrub | Date | Re: [xsl] for-each-group, Jeni Tennison |
Month |