Hi,
> 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.
>
>  
>
> <xsl:text> </xsl:text>
Trailing SEMICOLON missing.
>  
>
> <xsl:text> </xsl:text>
Again.
> Finally, I managed to get
> <xsl:text disable-output-escaping="yes">&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 , &160;,  , 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).
Cheers,
Jarno - Feindflug: Vollstreckung
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|