D
David Schwartz
So, I'm having a bit of a time trying to insert an <img> tag into an
<a> tag using an xsl variable. Consider the following template. The
contents of the foo variable doesn't show up in the anchor. When I use
named entities instead of < and >, it gets inserted just fine although
then it's not interpreted by the browser but, rather, simply included
as is in the page content.
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xslutput method="html" version="4.0" />
<xsl:template match="foo">
<xsl:variable name="bar">
<xsl:if test="$some-boolean-variable">
<img src="http://some-image.gif" border="0" width="7" height="7"/>
</xsl:if>
</xsl:stylesheet>
Any help on this would be greatly appreciated!
David
<a> tag using an xsl variable. Consider the following template. The
contents of the foo variable doesn't show up in the anchor. When I use
named entities instead of < and >, it gets inserted just fine although
then it's not interpreted by the browser but, rather, simply included
as is in the page content.
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xslutput method="html" version="4.0" />
<xsl:template match="foo">
<xsl:variable name="bar">
<xsl:if test="$some-boolean-variable">
<img src="http://some-image.gif" border="0" width="7" height="7"/>
</xsl:if>
</xsl:template>said:<xsl:value-of select="$bar"/></a>
</xsl:stylesheet>
Any help on this would be greatly appreciated!
David