Re: [xsl] usage of entities (for dummies)

Subject: Re: [xsl] usage of entities (for dummies)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 3 Aug 2006 11:02:47 +0100
> Do i have to nest replace-functions for each of them in one
> another like ...
> <xsl:value-of select="replace(replace(., '\^12', '&ccedil;'), '\^13',
> '&amp;')"/>
> ... or is there a more elegant solution for this?
in the most general case of course, nesting replace() calls is always an
> option but here I suspect that you can do something like

<xsl:analayze-space select="." regex="\^([0-9]+)">
<xsl:value-of select="$replacements[number(regex-group(1))]"/>
<xsl:value-of select="."/>

together with something that makes $replacements a sequemce with  a
c-cedila in position 12

<xsl:variable name="replacements"  select="(
'a','b',...,'&#e7;', '&amp;')

Current Thread