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

Not-quite normalize-space()

Subject: Not-quite normalize-space()
From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Mar 2007 15:24:11 +1200
 Not-quite normalize-space()
Hello

In various contexts I want to process text() nodes differently:

a) strip off leading WS, retain trailing WS, and normalize the rest
b) retain leading WS, strip off trailing WS, normalize the rest
c) retain leading and trailing WS, normalize the rest

I can write (have written) long-winded and rather unsatisfying procedures to
do all of these. But I had hoped that there might be something
concise/smart/elegant in the FAQ, however I haven't seen anything I
recognized as doing the above.

I'm sure that my (a) (b) and (c) must be reasonably common, so can anyone
offer a nice implementation? My application is still XSLT 1.0, but I'd be
interested to learn of any neater 2.0 solution too.


Thanks
Trevor

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-2007 All Rights Reserved.