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

Re: Stripping carriage returns

Subject: Re: Stripping carriage returns
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 4 May 2000 10:20:09 -0600 (MDT)
carriage return stripping program
> I would then look at your stylesheet and look at the places where you
> have used Returns and spaces for formatting the stylesheet, some of
> these also get sent to the output.

The stylesheet is interpreted as a node tree just like the source tree.
Whitespace-only text nodes in the tree (which will be the whitespace that
occurs between most sections of markup) are removed, per the spec, prior
to processing. Text nodes that contain more than just whitespace are not
stripped.

Specifically, the things to look for are things like
   <foo>
      some non-whitespace character data
   </foo>

...which is different than

   <foo>some non-whitespace character data</foo>

To preserve indenting, either use the above style, or use xsl:text.

   <foo>
      <xsl:text>some non-whitespace character data</xsl:text>
   </foo>

   - Mike
___________________________________________________________
Mike J. Brown, software engineer, Webb Interactive Services
XML/XSL stuff: http://www.skew.org/    http://www.webb.net/


 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.