RE: [xsl] non-breaking whitespace

Subject: RE: [xsl] non-breaking whitespace
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 29 Oct 2003 09:01:34 +0200

> What is the correct (or preferred) method of making a
> stylesheet which outputs html (i.e., <xsl:output 
> method="html"/>) to include
> a "non-breaking whitespace" in its result?

Umm... all methods will output it if you create a text node in the result tree that contains a NO-BREAK SPACE.
> I have experimented with all of the following, which
> most faqs recommend, and none work.  I am using libxslt.
> &#160;
> <xsl:text>&#160</xsl:text>

Trailing SEMICOLON missing.

> &#xA0;
> <xsl:text>&#xA0</xsl:text>


> Finally, I managed to get
> <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text> to work.

Oh, you want the general entity nbsp. If you absolute need to have the general entity, then d-o-e is the only way, *if* your processor doesn't output NO-BREAK SPACE characters using the nbsp entity. But you shouldn't need to care whether you have &nbsp;, &160;, &#xA0;, or   (NO-BREAK SPACE character as such), they're all the same character in the end (unless you've defined a entity with the name nbsp that doesn't map to NO-BREAK SPACE).


Jarno - Feindflug: Vollstreckung

 XSL-List info and archive:

Current Thread