[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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


Subject: [xsl] replace function to replace multiple characters by multiple characters
From: Frank Marent <frank.marent@xxxxxxxxxxx>
Date: Mon, 23 Oct 2006 14:22:30 +0200

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


Current Thread
Keywords