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

Re: Strip CRLF/newline only

Subject: Re: Strip CRLF/newline only
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 24 Oct 2001 14:06:22 -0600 (MDT)
xslt strip newline
Hunsberger, Peter wrote:
>         <person>
>             <name>
>                 <last/>, <first/>
>             </name>
>             <dateofbirth/>
>             <address>
>                 <addr1/>, <city/>, <state/>
>             </address>
>         </person>
> 
> In the text nodes there are significant spaces (the ones following the
> commas) that I want to preserve.  I don't want the extension to see the
> newline/CRLF's.  I assume this is a filter, but what's it look like?

The spaces following the commas will be preserved in the text nodes by
default. You don't need to do anything special. For example, between the
'addr1' and 'city' element nodes there is a text node containing ', '.

Just prior to the 'addr1' element node there is a text node containing a
linefeed followed by a number of spaces. This one, since it is only 
whitespace, can be affected by xsl:strip-space or xsl:preserve-space, but 
by default, if it's in a source document, it won't be stripped either.

I suspect that if you are having difficulty with the spaces after the 
commas, there must be something else going on that you didn't mention.
What are you trying to do, and where & how are you obtaining unexpected 
results?

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 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.