This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Insert an attribute to all nodes.
- To: xsl-list at mulberrytech dot com
- Subject: Re: Insert an attribute to all nodes.
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 11 Oct 2000 17:34:02 GMT
- References: <4C45858D148AD411A8B800A024B36E50F27163@granada.fhm.de>
- Reply-To: xsl-list at mulberrytech dot com
> Shouldn't there be all nodes like the original with
no because <xsl:element name="self:name">
makes an element called self:test, at least it would if self were
declared as a namespace prefix. As it is, your stylesheet seems to be in
error, which processor did you use?
sounds like you want
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:attribute name="VERSION"><xsl:value-of select="$version"/></xsl:attribute>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
(untested)
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list