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

Re: normalize-space() except ...

Subject: Re: normalize-space() except ...
From: "Christopher R. Maden crism@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Feb 2015 00:30:31 -0000
Re:  normalize-space() except ...
On 02/09/2015 06:23 PM, Liam R E Quin liam@xxxxxx wrote:
> I'd probably do this in two steps -
> (1) match text() and turn one or more whitespace characters into a
> space, probably using replace()
> (2) strip leading space from the first text() in p, and trailing
> space from the last;

My algorithm (for which I canbt find code right now, but may rewrite
later) is to concatenate the following:

1) If the text node starts with a space, a single space.

2) The results of normalize-space().

3) If the text node ends with a space, a single space.

~Chris
--
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
Surround hate and force it to surrender.
GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9  A210 4A51 DBAC 5C5C 3D5E

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.