This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: grouping question
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] grouping question
- From: "Blake, Stephen" <Stephen dot Blake at veritect dot com>
- Date: Mon, 26 Mar 2001 11:25:09 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
Jeni Tennison [mailto:mail@jenitennison.com] wrote
<great-explanation-snipped-for-brevity/>
> <xsl:key name="host-service-index" match="service" use="@name"/>
Eureka!
<more-cool-stuff-snipped-for-brevity/>
> So, try:
>
> <xsl:for-each
> select="domain/host/service
> [generate-id() =
> generate-id(key('host-service-index', @name))]">
> <xsl:sort select="@name"/>
> <p>
> <b><xsl:value-of select="@name"/></b>
> <ul>
> <xsl:for-each select="key('host-service-index', @name)/..">
> <li><xsl:value-of select="@name"/></li>
> </xsl:for-each>
> </ul>
> </p>
> </xsl:for-each>
Perfect!
> I hope that helps,
>
> Jeni
Indeed it did! Thank you very much for your cogent explanation.
Stephen Blake
Veritect
s t e p h e n . b l a k e @ v e r i t e c t . c o m
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list