Re: [xsl] how to rearrange nodes based on a dependency graph?

Subject: Re: [xsl] how to rearrange nodes based on a dependency graph?
From: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Dec 2001 17:52:35 -0500
I still can't see what this would do. This isn't about simply
filtering out nodes with dependencies, it is filtering out
those nodes that had already been processed because of the
dependency graph walk. The only way I can see to do this is
to somewhere keep a list of the processed nodes, but how
can I do that with XSL? (I guess I can't). The only alternative
would be to decide for every node if it would have been in
the dependency graph of any prior node. But that would mean
that all dependency graphs need to be always chased for every
node, that's kind of mind-boggling.


Chris Bayes wrote:

Or even
<xsl:key name='fragkey' match='frag' use='@id' />
<xsl:template match="frag[@requires]">
	<xsl:for-each select="@requires">
		<xsl:for-each select="key('fragkey',.)[not(@requires)]">
			<xsl:copy-of select="." />
	<xsl:copy-of select="." />
<xsl:template match="frag" />

Hey it's christmas. I don't use ids and idrefs. If this <xsl:for-each
select="@requires"> returns all of the idrefs then this might work. But
if it doesn't then mine is a stella and a bacardi and coke hick!

Ciao Chris

XML/XSL Portal

XSL-List info and archive:

Gunther Schadow, M.D., Ph.D.                    gschadow@xxxxxxxxxxxxxxx
Medical Information Scientist      Regenstrief Institute for Health Care
Adjunct Assistant Professor        Indiana University School of Medicine

XSL-List info and archive:

Current Thread