Re: [xslt] How to send   to not UTF-8 html output ?



On Fri, Jan 30, 2004 at 06:16:18PM +0300, Vladimir B. Grebenschikov wrote:
> 
> Only solution I have found is to use
> <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
> 
> but it is too big, does not work when text is supplied as parameter to
> template, and does not work if defined in <!ENTITY nbsp ...
> 
> &#160; does not work if output encoding not utf-8 (say KOI8-R)
> 
> Is any way to define real entity for &nbsp; ?

  At the XSLT level, no. XSLT works only on XML information set where
entities have been substitued with their repacement value, and for
&nbsp; that would be the character code point #160.

> Why &#1069; is translated right for all encoding (as valid character or
> as entity if can't be converted to characted) but &#160; does not
> translated to &nbsp; when it is not possible to out unicode character ?

  &nbsp; and &#160; are equivalent in HTML, so why do you want one
instead of the other ? Why would people have to use &nbsp; which depends
at least theorically on DTD support instead of using &#160; which is
the direct unanbigous reference to the code point you want (i.e. 
non-breaking-space) ... I see no logic behind your request.

> Looks like it is almost impossible to get text with character '&' on
> html output.

  This statement is far too wide to have any answer.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]