Re: sort a node across a dynamic group of files
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:text> </xsl:text> <xsl:value-of select="."/> </xsl:for-each>
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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format