|
Subject: Re: [xsl] adding attributes to an existing element From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Tue, 15 Oct 2002 17:54:02 +0200 |
<xsl:template match="/db/*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:attribute name="newattribute">newAttributeValue</xsl:attribute>
</xsl:copy>
</xsl:template>On Tue, 15 Oct 2002, Jeni Tennison wrote:
Try copying the existing attributes with xsl:copy-of. Something like:
<xsl:template match="name"> <name number="20"> <xsl:copy-of select="@*" /> </name> </xsl:template>
Thanks. However, can this solution be used if I do not know the element name (in this case, `name') a-priori?
For example, if I'd like to do this in:
<xsl:template match="/db/*"> ... </xsl:template>
Best,
S. Perugini
System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 joerg.heinicke@xxxxxxxxx www.virbus.de
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] adding attributes to an e, Saverio Perugini | Thread | RE: [xsl] adding attributes to an e, Nirmala R |
| Re: [xsl] adding attributes to an e, Saverio Perugini | Date | [xsl] fxt xslt comparison, bryan |
| Month |