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

RE: stripping non-breaking spaces

Subject: RE: stripping non-breaking spaces
From: Jordan Soet <jds@xxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Jun 2006 14:28:57 +0800
jordan stripping
Yeah, I agree that it's good that the pre-processing is there as an option,
I was just hoping that there was another way, as it's a little annoying to
have one stylesheet which does practically everything, and then another just
for stripping the spaces. Oh well, not that big a deal really. And sorry I
forgot to change the subject line.

Thanks,
Jordan 


Date: Wed, 28 Jun 2006 11:09:05 -0400
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Subject: stripping non-breaking spaces (was Re:  RE: xsl-list
  Digest 28 Jun 2006 05:10:00 -0000 Issue 820)
Message-Id: <7.0.0.16.0.20060628105933.03bd0928@xxxxxxxxxxxxxxxx>

Jordan,

At 02:44 AM 6/28/2006, you wrote:
>Thanks, but I was kind of hoping that there'd be something like the
>strip-space, so that the empty text nodes will get removed before the
>document is processed.

Unfortunately, you hope in vain. As David explained, the set of 
whitespace characters is defined in XML, and doesn't include the 
non-breaking space or other characters in the grey area between 
characters that formatters are bound to respect fully, and characters 
they are commonly allowed to manipulate or munge. There are many 
times when we want to strip such characters (em- and en-spaces, 
hyphens and what not) but since they're not defined in a special set 
(whose edges would be controversial and wouldn't serve everyone), we 
have to use ordinary character-stripping means to do so.

>  Is there a way to remove all the nbsp before the
>strip space happens other than to just process it with another stylesheet
>beforehand?

That's a perfectly good option (pre-processing with another 
stylesheet), and given how flexible it is, we should be glad it's not 
hard-coded into the tools, since the hard-coded version would almost 
surely not be what we want.

BTW, we like descriptive subject lines, like "stripping non-breaking 
spaces". It makes messages easier to find in the archives.

Regards,
Wendell

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.