Altova Mailing List Archives
>xsl-list Archive Home
>Recent entries
>Thread Prev - Re: [xsl] adding attributes to an existing element
>Thread Next - RE: [xsl] adding attributes to an existing element
Re: [xsl] adding attributes to an existing element
To:
Date: 10/15/2002 7:51:00 AM
<xsl:template match="/db/*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:attribute name="newattribute">newAttributeValue</xsl:attribute>
</xsl:copy>
</xsl:template>
Regards,
Joerg
Saverio Perugini wrote:
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
VIRBUS hat jetzt als erster deutscher Softwarehersteller die Zertifizierung
für den 3D Secure-Authentifizierungsstandard "Verified by Visa" erhalten.
Details unter
http://www.virbus.de/de/press/pressemitteilung/20020828_verified_by_VISA.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-listDisclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

