xsl-list
[Top] [All Lists]

[xsl] Not-quite normalize-space()

2007-03-29 20:24:48

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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>