xsl-list
[Top] [All Lists]

[xsl] replace function to replace multiple characters by multiple characters

2006-10-23 05:23:44
hi all

i can't find a function in xslt that replaces multiple characters by multiple characters. for the element

   <Body>This is a text with a lot of information</Body>

the function should work like

  ...
  <value-of select="powerreplace(., 'a lot of', 'few')"/>
  ...

and result

   <Body>This is a text with few information</Body>

as far as i can see, the normal 'replace' funktion does match multiple characters but only replace *one* character. the 'translate' function replaces single characters with single characters (i.e. translate(., 'ABCDEFGHIJKLM', 'abcdefghijklm') ).

where is the function to replace multiple characters by multiple characters?

frank

--~------------------------------------------------------------------
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>