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

Re: sort a node across a dynamic group of files

Subject: Re: sort a node across a dynamic group of files
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 22 Nov 2009 15:06:20 -0500
Re:  sort a node across a dynamic group of files
BTW, I prematurely sent my example without explaining why I put the items in a variable.

At 2009-11-22 14:57 -0500, I wrote:
      <!--$docs is ready with all documents-->
      <!--sort by name-->
      <xsl:variable name="names" select="$docs/doc/name"/>
      <xsl:for-each select="$names">
        <xsl:sort select="."/>
        <xsl:value-of select="."/>

Of course you don't need the variable above, you can just work with:

     <xsl:for-each select="$docs/doc/name">
        <xsl:sort select="."/>

But I had it in my mind you were asking about *grouping* across files and not just *sorting* across files. If you needed to group by common names, then putting them in a variable would allow you to find the common names and group under them as common headings.

Here are posts from 2004 and 2006 that show what you can do for grouping once you have the variable loaded from multiple files:


But in the end I realized you weren't asking for grouping and I failed to undo the preparations I had made.

I hope this helps.

. . . . . . . . . Ken

Vote for your XML training:   http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread


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.
First Name
Last Name
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.