RE: [xsl] Ommitting value of a copied id-Attribute

Subject: RE: [xsl] Ommitting value of a copied id-Attribute
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 20 Dec 2000 12:59:16 -0000
> I want to copy a node with all it's attributes and the values of the
> attributes except the id-attribute. I want also copy the id-attribute,
> but ommit the value of it.

This came up last month and several solutions were offered. The one I liked
best was:

<xsl:copy>
<xsl:variable name="excl" select="generate-id(@id)"/>
<xsl:copy-of select="@*[generate-id()!=$excl]"
<xsl:attribute name="id">... new value ...</xsl:attribute>
</xsl:copy>

Mike Kay 

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


Current Thread