Well I want to render a self closing tag say <img>
tag like this <img src="xyz.jpg" />
But I don't know how to do that...I mean how to render a self closing tag. What I'm having so far is below:-
Here is the XML:
<c:Image src="xyz.jpg"></c:Image>
And here is the XSLT:
<xsl:output indent="yes" omit-xml-declaration="yes" method="html" />
.
.
.
<xsl:for-each select="c:Image">
<img>
<xsl:attribute name="src">
<xsl:if test="string-length(@src)>0">
<xsl:text></xsl:text>
<xsl:value-of select="@src"/>
</xsl:if>
</xsl:attribute>
</img>
</xsl:for-each>
.
.
.
Any help appreciated.