[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Problems rendering nbsp entity

Subject: RE: Problems rendering nbsp entity
From: John Aschenbrenner <jaschenbrenner@xxxxxxxxxxxxxxx>
Date: Fri, 27 Sep 2002 11:36:58 -0700
non blanking space
Thanks, Jarno.  I've tried both utf-8 and utf-16 with the same results.  I
know that NO-BREAK SPACE does look like a space but it sure would be great
if I could just output a '&nbsp;'.

-----Original Message-----
From: Jarno.Elovirta@xxxxxxxxx [mailto:Jarno.Elovirta@xxxxxxxxx]
Sent: Wednesday, September 25, 2002 11:07 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Problems rendering nbsp entity


> I know I've seen this before but I can't seem to find it in 
> the archives.
> My apologies if this has been answered one too many times.

It probably has been, yes.

> In the past when I wanted to render a non blanking space when 
> using XSL to
> render HTML I have just used the entity &#160;
> I've even noticed that the &#160; entity is rendered as 
> &nbsp; in the HTML
> file when using the Saxon parser.  Most of the time MSXML 
> will render this
> appropriately as well.  However for some reason this does not 
> work this time
> when using that parser.  Now instead of getting the nicely formatted
> document that I want, I end up with question marks all over 
> the place.  When

What encoding are you using to output the HTML? Does the editor/viewer you
are using to view the document support that encoding? Is it actually using
that encoding?

> I look at the HTML that was rendered there are no actual 
> question marks in
> it just blank spaces where I wanted the &nbsp; to be.  I am 

Well... NO-BREAK SPACE does look awfully lot like a SPACE.

> assuming that
> for each question mark rendered I am seeing the space.
> Now after all that............
> Is there a way when using MSXML to get it to return the 
> actual entity &nbsp;
> in the rendered HTML instead of some space character.  For 
> example instead
> of <td> </td> have it render this <td>&nbsp;</td>

Output the document using an encoding that does not contains NO-BREAK SPACE,
e.g. US-ASCII.

> The problem as many know with using the entity &nbsp; as a 
> literal in XSL is
> that it is not defined.  Also, I do not really want to output 
> it as a non
> blank space in the HTML but rather render it directly as is - &nbsp;

Erm... why?


 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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.