Altova Mailing List Archives
>microsoft.public.xml Archive Home
>Thread Prev - xslt trim functionality
RE: xslt trim functionality
Date: 12/23/2004 1:39:00 PM
normalize-space(" Mary Ann ") will return "Mary Ann". However, normalize-space(" Mary Ann ") will also return "Mary Ann". If it's ok to have multiple occurances of whitespace normalized to a single whitespace character, then use this function. Otherwise, if you want to preserve embedded whitespace, no matter how many characters in a row there are, you'll have to use a named template and process the string with other string functions, or use an extension function. Regards, Mike Sharp "mike w." wrote: > is there a way in xslt to do a trim, where the leading and trailing white > space is remove. > trim(' Mary Ann ') would be 'Mary Ann' > > thanks > > mike w.