|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: "Simple" copy all and find and replace
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








