[xsl] RE: [xsl] RE: [xsl] RE: [xsl] Re: [xsl] RE: [xsl] Re: [xsl]   is being displayed as Á

Subject: [xsl] RE: [xsl] RE: [xsl] RE: [xsl] Re: [xsl] RE: [xsl] Re: [xsl]   is being displayed as Á
From: Jeff Beadle <Jbeadle@xxxxxxxx>
Date: Tue, 11 Dec 2001 12:12:45 -0500
I must be missing something, but why can't you define an entity decl at the
top of your stylesheet and let the parser handle the "translation" when it
streams the output?

<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

xml:
<xml/>

xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet ...>
<xsl:template match="/">
<html><body><h1>hello&nbsp;world!</h1></body></html>
</xsl:template>
</xsl:stylesheet>

output:
<html><body><h1>hello world!</h1></body></html>


hope this helps!

-Jeff

-----Original Message-----
From: Brinkman, Theodore [mailto:Theodore.Brinkman@xxxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, December 11, 2001 11:55 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] RE: [xsl] RE: [xsl] Re: [xsl] RE: [xsl] Re: [xsl] &#160;
is being displayed as Á


However, you might try '&amp;nbsp;' instead.  That should translate into
&nbsp; in the output.
	- Theo

-----Original Message-----
From: Michael Kay [mailto:michael.h.kay@xxxxxxxxxxxx]
Sent: Tuesday, December 11, 2001 11:37 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] RE: [xsl] Re: [xsl] RE: [xsl] Re: [xsl] &#160; is being
displayed as Á


>
> My problem was that the browser (IE) did not correctly display " ",
> because it was not automatically recognising the character set. I
> tried changing the charset (in xsl:output) to iso-8859-1, but I still
> had the same problem, that IE was displaying Á.

Sorry, I can't help you with the mysteries of configuring IE correctly.
>
> If I was creating the HTML by hand, I would insert &#160; so what is
> wrong with generating this through XSLT?

Nothing's wrong with generating &#160; using XSLT. But writing &amp;#160; in
your stylesheet won't do that; it will generate &amp;#160;

Mike Kay
>
>
> >> You can do this by changing:
> >>
> >>    &#160;
> >> to:
> >>    &amp;#160;
> >>
> MK> Don't do that, unless you want it to appear as "&#160;"
> rather than " " when
> MK> viewed in the browser.
>
> I don't understand. When I put the output into IE it displays " ". The
> bare HTML has "&#160;" obviously (as desired), but the browser
> correctly displays " ".
>
> I assume we are talking at cross-purposes somehow.
>
> --
> groovy baby,
>  Kevin                    mailto:xmldude@xxxxxxxxxxxxxxxx
>
> ++++++++++++ Cool music - http://burieddreams.com/marshan
> ++++++ Attitude Webzine - http://burieddreams.com/attitude
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread