Re: [xsl] How to deal with special characters in XSL?

Subject: Re: [xsl] How to deal with special characters in XSL?
From: "Rafael 'Dido' Sevilla" <sevillar@xxxxxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2001 16:48:35 +0800
On Wed, Oct 17, 2001 at 09:49:58AM +0200, Amiceto wrote:
> Hi everybody:
> I come back to the list.
> What if I need &nbsp; printed in the outputed html?
> yes I can use &#0160; but this prints " " not "&nbsp;"

No, it prints the Unicode character with the code #0160, which is the
UTF-8 representation of a non-breaking space.  All web browsers younger
than perhaps Netscape 2.0 should understand this (Gosh, that was about
six years ago!).

> and I need it for crossbrowser html

You don't need it for crossbrowser HTML, unless you're looking at
giving support for ancient browsers that don't understand Unicode; I
doubt such creatures are still used anywhere!

Some XSLT engines (Saxon for example) produce &nbsp; for &#0160;, and
substitute entities here and there, if they are set up to operate in
HTML output mode, but this is not required by the standard, so don't
count on it being available everywhere.

Rafael R. Sevilla <sevillar@xxxxxxxxxxxxxxxxx>   +63(2)   8177746 ext. 8311
Programmer, Inter.Net Philippines                +63(917) 4458925                OpenPGP Key ID: 0x5CDA17D8

 XSL-List info and archive:

Current Thread