This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: how to rearrange nodes based on a dependency graph?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]