|
Subject: Re: [xsl] Identifier attribute (was: Re: [xsl] Creating Hierarchy) From: Michael Ludwig <mlu@xxxxxxxxxxxxx> Date: Fri, 24 Oct 2008 14:50:19 +0200 |
Now I've got a further problem - the second pass is inserting the values in the id attributes, but it's dropping any other attributes that are in the result of pass1.
<xsl:template match="*[@id]">
<xsl:copy>
<xsl:attribute name="id">
<xsl:number level="any" count="*[@id]"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
This copies all attributes, including @id. The xsl:attribute that follows then adds another @id with the value you want, which overrides the first one.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Identifier attribute (was, Rowan Sylvester-Brad | Thread | Re: [xsl] Identifier attribute (was, Rowan Sylvester-Brad |
| Re: [xsl] Identifier attribute (was, Rowan Sylvester-Brad | Date | Re: [xsl] Elements and functions av, Michael Ludwig |
| Month |