This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: grouping question




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]