Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Sorting and Grouping Elements > [2.0] New Grouping Syntax in XSLT 2.0

[2.0] New Grouping Syntax in XSLT 2.0

In 2001, the XSL Working Group released a document entitled “XSLT Requirements Version 2.0.” More than half of the document came under the heading “Must Simplify Grouping.” (I can’t imagine how the group would have met a requirement named “Must Make Grouping More Complicated and Confusing.”) We’ll take a look at those changes in this section.

XSLT 2.0’s grouping functions are built around the <xsl:for-each-group> element. Within this element, we’ll use the new XSLT functions current-group() and current-grouping-key() to work with the data we’re grouping. There are four mutually exclusive attributes for the <xsl:for-each-group> element, each of which performs a different style of grouping:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint