RE: [xsl] grouping question

Subject: RE: [xsl] grouping question
From: "Blake, Stephen" <Stephen.Blake@xxxxxxxxxxxx>
Date: Mon, 26 Mar 2001 11:25:09 -0500

Jeni Tennison [mailto:mail@xxxxxxxxxxxxxxxx] 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


Current Thread