This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to deal with special characters 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 ' ', but what he really wants 
is a non-breaking space. Since in his experience ' ' 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 ' '. (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 ' ' 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@mulberrytech.com
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]