[Home] [By Thread] [By Date] [Recent Entries]
Hi Graeme,
You can start with a recursive copy template and add a rule to a that adds the alt attribute: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template> <xsl:template match="a"> <xsl:copy> <xsl:attribute name="alt"><xsl:value-of select="."/></xsl:attribute> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template> </xsl:stylesheet> Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com graeme.ludwig@xxxxxx wrote: I'd like to combine elements of solutions 12 and 8 of Dave Pawson's XSL copying FAQ (http://www.dpawson.co.uk/xsl/sect2/N1930.html).
|

Cart



