Re: [xsl] Copy attributes? ... possible problem in FAQ

Subject: Re: [xsl] Copy attributes? ... possible problem in FAQ
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 9 Mar 2001 15:41:23 GMT
> I'm trying to change a tag name 
(Tags don't have names, they are markup containing element names)

> <xsl:attribute name="name()">

the name attribute is an AVT so that should be

<xsl:attribute name="{name()}">

However if you don't want to change the names of the attributes
there is no need to do this you can just copy them. Replace your
for-each by

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

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread