[xsl] Is there a way to use character-map to do replacements in a string ?

Subject: [xsl] Is there a way to use character-map to do replacements in a string ?
From: "Christophe Marchand cmarchand@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Mar 2019 15:15:26 -0000
I have a variable :
<xsl:variable name="content" as="xs:string" select='EC'/>

I want to transform special caracters according to a character-map 
definition (I think it's much easier to maintain) :
 B  <xsl:character-map name="cm">
 B B B  <xsl:output-character character="E" string="oe"/>
 B B B  <xsl:output-character character="C" string="ss"/>
 B  </xsl:character-map>

Something like
<xsl:variable name="escaped" as="xs:string" 
select="escape-according-tocharacter-map($content, 'cm')"/>

Is there a way to do it with XSLT 3.0 ?


Best regards,
Christophe

Current Thread