[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Can someone explain this generate-id and key xsl fragment to me?


Subject: Re: [xsl] Can someone explain this generate-id and key xsl fragment to me?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 28 Feb 2014 23:00:59 +0000

On 28/02/2014 20:44, russurquhart1@xxxxxxxxxxx wrote:
<xsl:for-each select="//errata_section
>>   [generate-id(.)=generate-id(key('module-index',module_impacted[1])]">
>>  <xsl:sort select="module_impacted"/>


So, to my next question, as that is trying to find all the unique
module_impacted elements


well more exactly it is finding the sets of errata_section elements that have the same value for their first module_impacted element, and returning the first errata_section in each group.

module_impacted elements that are not the first child of an errata_section are not considered for the grouping (although probably accidentally they are in the sort)


David



Current Thread