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:attribut e name="class">ri ght</xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:for-each>
The code adds a class attribute named right to the given img-tag.
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:attribut e name="class">ri ght</xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:for-each>
The code adds a class attribute named right to the given img-tag.
Comment