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: soft returns/wrap not displaying the way I want



                line 3 is longer than 20 characters so a soft return will


By soft return I assume you mean line breaking at a space character.


This is just an HTML question, if the browser is not breaking that
line at the end of the browser window then either it is a <pre>
or the spaces are not spaces but &#160; (&nbsp;) or there is a <span>
or other element with a css white-space: nowrap property.
But in any of these cases the HTMl construct can only be in the output
if your stylesheet is putting it there, and without seeing the
stylesheet how can anyone say?

XSLT has _no_ effect on the rendering. It just writes out HTML (in your
case) and the browser renders the HTMl just as if it were a normal HTML
file. 

By default you get two modes in HTML, normal where spaces and line breaks
all count as the same thing, and produce a space or a break at the end
of the window, or nowrap (as in <pre> where spaces don't ever forma line
break, but line break characters do).

If your problem is that you want a third mode, where spaces may possibly
line break but line break characters always line break. Then you can not
do that in HTML so you need to make your XSLT change all linebreak
characters (ie &#10;) to <br/> using a replace template as found in the
faq.

But first you need to specify what HTML you are trying to generate.

David







_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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]