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

Re: Sorting by document order of some other element

Subject: Re: Sorting by document order of some other element
From: "Peter Hunsberger" <peter.hunsberger@xxxxxxxxx>
Date: Tue, 26 Jun 2007 10:21:34 -0500
Re:  Sorting by document order of some other element
On 6/25/07, David Carlisle <davidc@xxxxxxxxx> wrote:


<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="k" match="set2/*" use="@id"/> <xsl:output indent="yes"/> <xsl:template match="doc"> <set2> <xsl:copy-of select="for $e in set1/* return key('k',$e/@id)"/> </set2> </xsl:template> </xsl:stylesheet>


David, that's a cool solution. Unfortunately I glossed over the fact that there is some manipulation of the data within the second set going on. I'm going to experiment with trying this approach within a for-each and/or apply-template. as well as attempting to invert the problem as suggested by Eric.


-- Peter Hunsberger

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.