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


well maybe I am lost here...maybe this is just an html problem?

I think this might explain it better.
Think of me having 2 xsl files, both using the same xml file.  One that
allows data to be edited (ie. input boxes, radios, and textarea etc), and
one that pulls data from xml and simply displays it.

The xsl edit file I have works fine.  A user can enter text into the text
area, it wraps automatically (soft returns), and does hard  returns (when
the user hits enter) fine in the text area box .  If this data is pulled
from xml to display in the textarea box, it looks fine by doing the hard and
soft returns.

The xsl file that displays this same data will not do any soft returns.  I
need to know how to solve this.  It will just display whatever is in the XML
on one long line.

ex. my xsl edit file has a textarea box that is say ... 20 characters long
and it pulls data from xml tag such as:
<example>line 1
                line 2
                line 3 is longer than 20 characters so a soft return will
happen, ie. word wrap.
                final line.
</example>

so the text area box will display it similar to below
line 1
line 2
line 3 is longer than
20 characters so a 
soft return will happen
ie. word wrap.

A user could enter more text, it would automatically wrap, hit the enter
key, do hard returns etc etc.

Now in my xsl display file...I retrieve the same xml tag
and it will display like this...

line 1
line 2
line 3 is longer than 20 characters so a soft return will happen.ie. word
wrap

I need code in xsl that will do something to the xml coming in to allow it
automatically wrap so it will
looks similar to the textarea format.  I need <xsl:value-of select="whatever
node i want here to get the data"> to 
somehow diplay it wrapped nicely and still have the hard returns in it.  I
thought of just simply nesting it within
a table which allows the soft returns/word wrap  but loses the hard returns.

p.s. sorry for the wordy explanation.  I'm lost here.  Maybe <pre> is not
even part of the solution to this.  I was just looking
in the archives and something like this was in there.  

> -----Original Message-----
> From:	David Carlisle [SMTP:davidc@nag.co.uk]
> Sent:	Thursday, April 26, 2001 1:00 PM
> To:	xsl-list@lists.mulberrytech.com
> Subject:	Re: [xsl] soft returns/wrap not displaying the way I want
> 
> 
> > (ie. this line doesn't do any softwraps...
> > <pre><xsl:value-of select="."/></pre>)
> 
> well why do you have the <pre> there if you want th ebrowser to
> linebreak the text?
> 
> But this isn't an XSL question, it's just an HTML one isn't it?
> 
> 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

 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]