Solvegen articles

Archives by date

Search in Blog

Contact information

Solvegen, Inc
Phone: +1 310 929 5205
E-mail: info@solvegen.com
Web: www.solvegen.com
Skype: solvegen
MSN: solvegen@hotmail.com

Posts Tagged ‘XSLT’

How can I make insert a space character ( ) into my html output from the xsl?

Tuesday, June 16th, 2009

I tried so:

<xsl:text> <xsl:text> — have no space character in html code;
<xsl:text>&nbsp;<xsl:text> — don’t work, XSLT processor error “Entity ‘nbsp’ not defined.”;
<xsl:text>&amp;nbsp;<xsl:text> — obtained &amp;nbsp; in html code, but no space character;
<xsl:text><![CDATA[ ]]> <xsl:text> — have no space character in html code;
<xsl:text><![CDATA[&]]>nbsp; <xsl:text> — &amp;nbsp; in html code, but no space character;
<xsl:text><![CDATA[&nbsp;]]> <xsl:text> — &amp;nbsp; in html code, but no space character;

Finaly, I decided this by inserting <![CDATA[&nbsp;]]> into XSLT, and then seting attribute “disable-output-escaping” in XSLT to “yes”. But I suppose this solution is not the best one.

Сorrect code: <xsl:text disable-output-escaping=”yes”><![CDATA[&nbsp;]]></xsl:text>