Using a space character in XSL template?

I’ve noticed in an XSL template you can’t use   to include a non-breaking space character, because it is treated as an invalid variable. Does anyone know a way around this?

  • Will

Ignore that guys, you just have to use & # 1 6 0 ; (without the spaces).

  • Will

Yep, you have to use the numeric entities, rather than named ones, since they don’t really exist under XSL.

Another option is using this:

<xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>

Where do u put the <xsl:text /> tag? Wherever I try it gives me the error:

“xsl:text is not allowed in this position in the stylesheet!”

  • Will

As long as it’s inside an <xsl:template> tag it should be fine :slight_smile: