Re: [xsl] copy of attributes

Subject: Re: [xsl] copy of attributes
From: Anton Triest <anton@xxxxxxxx>
Date: Thu, 21 Oct 2004 10:57:28 +0200
Andrey V. Elsukov wrote:

<xsl:template name="attributes">
     <xsl:for-each select="attribute::*">
       <xsl:attribute name="{name()}">
             <xsl:value-of select="self::node()"/>
       </xsl:attribute>
     </xsl:for-each>
</xsl:template>

<xsl:template match="node">
<node>
 <xsl:call-template name="attributes"/>
</node>
</xsl:template>

That would probably work but you can also do this:

   <xsl:template match="node">
       <xsl:copy-of select="@*"/>
   </xsl:template>

Cheers,
Anton

Current Thread