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

RE: Whitespace problem

Subject: RE: Whitespace problem
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 16 Jun 1999 14:52:21 +0100
RE: Whitespace problem
>Richard Lander said:
> I am having quiet a bit of trouble with whitespace.> 
> My question: How do I force XSL to strip out the carriage 
> returns in the
> text of an element? I am using the 1998-12-16 draft, as I want to stay
> compatible with IE5.

First note that strip-space doesn't do anything to newlines adjacent to text
(it took me a long time to grasp this). It only affects spaces and newlines
that are surrounded by tags on both sides. It will remove the newline
between the tags here:

<atag/>
<btag/>

but will leave two newlines here:

<atag/>
Some text with a newline before and after
<btag/>

If you want to remove the newlines in the latter, use normalize(). But
that's not in the Dec 16 draft nor, as far as I know, in IE5.

As James Clark clarified to me in response to a query, (the spec is not
entirely clear on the point), "stripping a node" means removing the node
from the tree, not removing spaces from the node.

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.