Subject: Re: [xsl] Re: How to preserve white space of a title line From: Mike Brown <mike@xxxxxxxx> Date: Mon, 9 Apr 2001 19:37:15 -0600 (MDT) |
> Now I wonder is there a better (or straightforward) approach to render > the string in HTML output mode without using translate function > and meantime keeps multiple spaces display. No. This has nothing to do with XSLT, really. You are producing HTML that looks like this: <p>Hello World</p> It is a feature of HTML that the spaces in between Hello and World consitute a single word separator, which means it will be rendered in the browser with a single breaking space most of the time. The only place you can avoid this is in a <pre> element, or in an element with the CSS property 'white-space: pre'. Like: <pre>Hello World</pre> or <p style="white-space: pre">Hello World</p> ...although the latter is not widely supported, and the former is traditionally rendered in a fixed-width font. In general, if you want non-breaking spaces, don't put regular spaces in your HTML. Put non-breaking spaces in. - Mike _____________________________________________________________________________ mike j. brown, software engineer at | xml/xslt: http://skew.org/xml/ webb.net in denver, colorado, USA | personal: http://hyperreal.org/~mike/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: How to preserve white spa, Yang | Thread | [xsl] xsl: help (urgent), Reghu Krishna Pillai |
[xsl] Re: How to preserve white spa, Yang | Date | [xsl] xsl: help (urgent), Reghu Krishna Pillai |
Month |