Subject: [xsl] Copy attributes? ... possible problem in FAQ From: Nick Vincent <Nick@xxxxxxxxxxxx> Date: Fri, 9 Mar 2001 15:25:52 -0000 |
Hi all, I'm trying to change a tag name and copy all of it's attributes. The suggested way of doing this in the copy FAQ at www.dpawson.co.uk is this: <xsl:template match="mytag"> <mynewtagname> <xsl:for-each select="*@"> <xsl:attribute name="name()"><xsl:value-of select="." /></xsl:attribute> </xsl:for-each> <!-- Deal with content --> </mynewtagname> </xsl:template> However, in <xsl:attribute name="" /> the name parameter is of type 'qname', which is not calculated at runtime, hence the actual output is: <mynewtagname name()="value"> ... </mynewtagname> Is there any other way of doing this? Thanks, Nick Vincent NeoWorks XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Bringing XML values into , cutlass | Thread | Re: [xsl] Copy attributes? ... poss, David Carlisle |
RE: [xsl] XSL tranformation perform, Chris Bayes | Date | [xsl] RE: Copy attributes? ... poss, Nick Vincent |
Month |