[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Can someone explain this generate-id and key xsl

Subject: Re: Can someone explain this generate-id and key xsl fragment to me?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 28 Feb 2014 19:34:04 +0000
Re:  Can someone explain this generate-id and key xsl
On 28/02/2014 18:17, russurquhart1@xxxxxxxxxxx wrote:
Hi,

I'm having to manage an xslt that someone else wrote, that generally works correctly, but when it doesn't i have problems.

In one template that is a for-each command that is executed. The line is:

<xsl:for-each select="//errata_section[generate-id(.)=generate-id(key('module-index', module_impacted)[1])]">
  <xsl:sort select="module_impacted"/>




That is the standard idiom known as Muenchian grouping (google for it) that was used to group items (or remove duplicates0 in XSLT 1. It is largely replaced by xsl:for-each-group in XSLT2.


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.