Tim,
> When this runs, I get the error E1_ADDING_DUPLICATE_ATTRIBUTE, even though
> the attributes should be created in different element nodes. [I know this is
> not a great example, but it points out some problems].
Sorry, I couldn't reproduce the error from the fragment you sent. I
modified it in a minimal way to make it a stylesheet, and it gave the
correct result. I include both the stylesheet and the small input file I
ran it on.
It may happen that this is a different error which didn't "get caught"
due to a forgotten E() macro. Could you please send the whole test
files? Are you running Sablot 0.42?
Tom
<!-- stylesheet -->
<xsl:transform xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:xfa="joe.cool.gov"
version='1.0'>
<xsl:template match='*/window'>
<xsl:variable name="n1">WINDOW_<xsl:value-of
select="@name"/></xsl:variable>
<xsl:variable name="n"><xsl:value-of select="@page"/>_<xsl:value-of
select="@name"/></xsl:variable>
<xsl:variable name="this1" select="translate(string($n1),'%','')"/>
<xsl:variable name="this" select="translate(string($n),'%','')"/>
<xsl:element name="{$this1}">
<xsl:attribute name="xfa:dataNode">dataGroup</xsl:attribute>
<xsl:element name="{$this}">
<xsl:attribute name="xfa:dataNode">dataGroup</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:transform>
<!-- input -->
<windows>
<window name="A" page="1"/>
<window name="B" page="2"/>
<window name="C" page="3"/>
</windows>