Re: Stripping carriage returns

Subject: Re: Stripping carriage returns
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 4 May 2000 10:20:09 -0600 (MDT)
> 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