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

RE: how to rearrange nodes based on a dependency graph

Subject: RE: how to rearrange nodes based on a dependency graph?
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Thu, 20 Dec 2001 23:49:31 -0000
chris forget
Ok what about (and I am getting rather blind here)

<xsl:template match="/">
	<xsl:variable name="allIdsUsed" select="//frag[@requires]">
		<xsl:for-each select="@requires">
			<ids><xsl:value-of select="." /></ids>
		</xsl:for-each>
	</xsl:variable>
	<xsl:for-each select="xx:node-set($allIdsUsed)/ids">
		<xsl:copy-of select="//frag[@id = .]" />
	</xsl:for-each>
	<xsl:copy-of select="//frag[@requires]" />
</xsl:template>

This only works if you can get all of the ids out of the @requires idref
but like I said I don't use them. If it doesn't then you wil have to
split the @requires into the <ids /> somehow.

Ciao Chris
Forget the bacardi I'm on the red bulls

XML/XSL Portal
http://www.bayes.co.uk/xml


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.