Subject: Re: [xsl] Sorting by document order of some other element From: "Peter Hunsberger" <peter.hunsberger@xxxxxxxxx> Date: Tue, 26 Jun 2007 10:21:34 -0500 |
<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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Sorting by document order, David Carlisle | Thread | Re: [xsl] Sorting by document order, Florent Georges |
Re: [xsl] XTDE1490 and using the Sa, Abel Braaksma | Date | Re: [xsl] Problem with Collections , Abel Braaksma |
Month |