My problem is when i mix html elements in my xsl stylesheets, i am confused in what i am generating as the XML parses just complains:
Error on line 1 column 1
SXXP0003: Error reported by XML parser: Premature end of file.
Here’s my code
<xsl:template match="myTemplate">
<xsl:variable name="fieldtype" select="Radio"/>
<td width="100px"><span style="word-wrap: break-word">
<xsl:value-of select="$fieldtype"/></span></td>
</xsl:template>
Will this show up as
<td width="100px"><span style="word-wrap:break word">Radio</span></td>
I’m not sure why you’d need to encode the HTML. There’s nothing special about the HTML you’ve shown us that would prevent it from being parsed as valid XHTML.
If for some reason you must encode the HTML, it might be safer to assign the attributes using
xsl:attribute.