[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Rename Some Node ans attribute
Davide Antoni wrote:
Hi to all Why all the complex xsl:copy and xsl:copy-of intermingled with xsl:if? Make it yourself easier by applying the (in)famous copy-idiom. Try this as a complete replacement of your code and the magic of XSLT will do the work: <xsl:template match="node( ) | @*"> <xsl:copy> <xsl:apply-templates select="@* | node( )"/> </xsl:copy> </xsl:template> <xsl:template match="@idCup"> <xsl:attribute name="idCUP"> <xsl:value-of select="."/> </xsl:attribute> </xsl:template> Hope this helps, Cheers -- Abel Braaksma http://www.nuntia.com
|
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
|