Anyway, my primary problem remains. Any ideas?
Volker.
I would use a variable here, then query that for each id.
Something like:
<xsl:variable name="indexToIDs">
<xsl:for-each select="//*[(_at_)index]">
<xsl:variable name="pos" select="position()"/>
<entry genid="{generate-id()}"
id="{/transformation/id_list/id[$pos]}"/>
</xsl:for-each>
</xsl:variable>
Which will give you an RTF of elements like this:
<entry genid="abc" id="2003..."/>
<entry genid="foo" id="2004..."/>
Then you should perform an identity transform on your source, with an
extra template handling elements with @index.
In that template query the rtf (or more to the point, query a variable
that is a nodeset of the rtf) using the generated id of the current
element for its id, and construct your output how you want it, something
like:
The identity transform:
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
The template to handle the special case:
<xsl:template match="*[(_at_)index]">
<xsl:variable name="genid" select="generate-id()"/>
<xsl:copy>
<xsl:copy-of select="$indexToIDsNodeSet/entry[(_at_)genid =
$genid]/@id"/>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
A template to supress @index
<xsl:template match="@index"/>
cheers
andrew
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list