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

Re: How to deal with special characters in XSL?

Subject: Re: How to deal with special characters in XSL?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2001 11:25:38 -0400
nbsp character in xsl
Aniceto and everyone:

This is turning into a little rat hole because no one has clarified for Aniceto that what he thinks he wants is '&nbsp;', but what he really wants is a non-breaking space. Since in his experience '&nbsp;' is the way to get a non-breaking space, that's what he thinks he wants. But any other way of getting a non-breaking space -- which would meet his requirement of cross-browser support -- would work as well.

Aniceto, in your XSLT please try using '&#160;'. (I hope you're using an e-mail client that sees I've just typed

& # 1 6 0 ;

except with no spaces in it.)

What you will get out the back of your processor will depend on the processor and the output method you are using, but it *must* be a non-breaking space or a representation of one in one form or another. You are used to seeing its representation as '&nbsp;' but it's quite likely the space character itself. Since this is is, after all, a kind of *space*, you may not be able to "see" the character in your output file. But it should be there, and have the desired effect in your table cells.

The various workarounds people have suggested may be more than you need to know right now: all will become clear as you learn the mysteries of character sets and how tangled they can be, in the present period when we are migrating (knock on wood!) from using system-dependent character encodings, to a standard (Unicode).

If '&160;' does not work in your browser as a non-breaking space (remember the issue is not whether you can see it), you might tell us also

which XSLT processor you are using
which output method your stylesheet has set
  (hint: tell us both whether you have an xsl:output element, AND what
   the document element of your output document is ... probably <html> ...?)

I hope this helps.

This business about the non-breaking space is a Frequently Asked Question, which is part of the reason why although we are trying to exercise patience, we may not be systematically covering all the wrinkles in what is, after all, a complex issue to explain since we don't know what you know, or how deep to go in helping you understand and solve your problem. (This issue is also explained already in the XSL FAQ and, repeatedly, in the archives of this list.)

Regards,
Wendell

At 10:25 AM 10/17/01, you wrote:
ok maybe I din't explain my little problem about &nbsp;:

sometimes I neet <td>&nbsp;</td> for netscape right cell dispalying
or sometimes just &nbsp;&nbsp;&nbsp;&nbsp; to force a big white space

all in the middle of the html code outputed
I've tryed all the solutions given but no way till now

thanks for the patien
thanks with node-exist help cutlass and David

Aniceto Lopez


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


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.