Use concat() to add a non-space character (e.g. "#") fore and aft, then
apply normalize-space(), then strip off the leading and trailing "#" using
substring().
Or in XPath 2.0, just do replace($in, '\s+', ' ')
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Florent Georges [mailto:darkman_spam(_at_)yahoo(_dot_)fr]
Sent: 27 December 2005 17:29
To: XSL Mulberry list
Subject: [xsl] 'fn:normalize-space', but with 0 or 1
heading/trailing space
Hi
I need a function similar to 'fn:normalize-space', but
that not strip the heading and leading space if present
(more precisely I want one space if one or more heading or
leading whitespace is present).
Do I need to code this entire function from scratch, or
to use 'fn:normalize-space' and add myself a space if I
detect any whitespace, or to... use a better solution?
Regards,
--drkm
______________________________________________________________
_____________
Nouveau : téléphonez moins cher avec Yahoo! Messenger !
Découvez les tarifs exceptionnels pour appeler la France et
l'international.
Téléchargez sur http://fr.messenger.yahoo.com
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--