How to insert   in XSLT

How can I insert

 

Into an XSLT stylesheet, I keep getting this error:

XML Parsing Error: undefined entity

Essentially I want a non breaking space character in the XSLT Template.


Try using the entity   instead.

More details on why   doesn't work and other options here.


&#160; works really well. However, it will display one of those strange characters in ANSI encoding. <xsl:text> worked best for me.

<xsl:text> </xsl:text>

人们也可以这样做:

<xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>
链接地址: http://www.djcxy.com/p/34324.html

上一篇: 动态添加元素

下一篇: 如何插入&nbsp; 在XSLT中