Here are the XSL and XML files. When I remove namespace usage from the XSL
file, everything works fine. If I leave the namespaces in, I get
ET_BAD_PREFIX, in addition to E1_ADDING_DUPLICATE_ATTRIBUTE. I assume that
the duplicate attribute error is a cascading error caused by the prefix
error. I don't know if I am using namespaces improperly in XSL or whether
this is a Sablotron bug. I was running with Sablotron 0.42.
Tom, I thought it might be a better idea to post this on the mailing list.
Here are the errors:
Error [code:227] [URI:file://smartxsf.xsl] [line:32] [node:element
'<xsl:attribute>']
invalid namespace prefix 'xfa'
Error [code:227] [URI:file://smartxsf.xsl] [line:34] [node:element
'<xsl:attribute>']
invalid namespace prefix 'xfa'
Error [code:227] [URI:file://smartxsf.xsl] [line:32] [node:element
'<xsl:attribute>']
invalid namespace prefix 'xfa'
Error [code:227] [URI:file://smartxsf.xsl] [line:34] [node:element
'<xsl:attribute>']
invalid namespace prefix 'xfa'
Error [code:248] [URI:file://smartxsf.xsl] [line:34] [node:element
'<xsl:attribute>']
duplicit attribute 'xfa:dataNode' on output
-----Original Message-----
From: Kaiserovi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 27, 2000 2:39 AM
To: Sablotron Mailing List
Subject: Re: [Sab] BUG: no duplicate attributes here!
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>
=?utf-8?B?c21hcnR4c2YueHNs?=
=?utf-8?B?Zm9ybTIueG1s?=