Last active
August 29, 2015 14:08
-
-
Save marianogonzalez/97bc262fc04dcd722cf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mulexml:xslt-transformer name="xslt"> | |
<mulexml:xslt-text> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> | |
<xsl:template match="/"> | |
<table> | |
<xsl:for-each-group select="cities/city" group-by="@country"> | |
<tr> | |
<td> | |
<xsl:value-of select="@country"/> | |
</td> | |
<td> | |
<xsl:value-of select="current-group()/@name" separator=", "/> | |
</td> | |
<td> | |
<xsl:value-of select="sum(current-group()/@pop)"/> | |
</td> | |
</tr> | |
</xsl:for-each-group> | |
</table> | |
</xsl:template> | |
</xsl:stylesheet> | |
</mulexml:xslt-text> | |
</mulexml:xslt-transformer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment