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

RE: Whitespace again

Subject: RE: Whitespace again
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 29 Jun 1999 17:48:30 +0100
newline characters in outputtext jsp
> 
> Thank you for you answer,
> but it still doesn´t work.
> 
> > >
> > > I have a xml documnet:
> > >
> > > <text>line 1
> > > line 2
> > > </text>
> > >
> > > My problem is that in the html output there is no 
> linebreak. 

The XSL facilities for whitespace control (xsl:preserve-space, etc) are
irrelevant to this: they only affect whitespace that is surrounded on both
sides by tags.

Whitespace that has text before or after it (or in this case, both before
and after) should be copied to the output file.

But if the output is HTML, this is irrelevant, because newline characters in
HTML are equivalent to spaces.

If you want a visible line break in the page as displayed by the HTML
browser, your options are:

a) generate a <PRE> </PRE> element around the output text
b) convert the newlines in the text to <BR> tags (a nice little exercise in
the use of substring-before, concat, etc)

Mike Kay


 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.