Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: How to simplify? How to simplify?To: NULL Date: 6/7/2008 2:08:00 PM Hi I've got the following XSLT that works but I'm trying to figure out how to simplify it. There is only one Image, so I don't need the for-each-loop. Anyone? <xsl:for-each select="Data[@Name='Image']/img"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="class">right</xsl:attribute> <xsl:apply-templates/> </xsl:copy> </xsl:for-each> The code adds a class attribute named right to the given img-tag. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
