Hi,
> For my program I need XML-Files, where nodes like PHOTO, IMG,
> FOTO, BILD, BILDCHEN should be renamed with the name IMAGE
> and the original name should be saved as an attribute "oldname".
> The rest of the file should be the same. Just copy all and
<xsl:template match="PHOTO | IMG | FOTO | BILD | BILDCHEN">
<IMAGE oldname="{name()}">
<xsl:apply-templates select="@* | node()"/>
</IMAGE>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
Cheers,
Jarno
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|