[xsl] Replace one entity with another

Subject: [xsl] Replace one entity with another
From: Keith Gilbert <kgilbert@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Oct 2009 08:41:17 -0500
I have a complex XML file that I'm transforming into a simpler XML file.

<xsl:template match="/">
<root>
<xsl:for-each select="document/record">
<product>
<description>
<xsl:value-of select="short_description"/>
<xsl:text>&#x000A;</xsl:text>
</description>
</product>
</xsl:for-each>
</root>
</xsl:template>


My problem is that many of <description> elements contain &#153; in their content, and I need to replace all of these with &#x2022;

I can't get my head around how to do this. I understand GREP, so if a regular exp. needs to be built to do this, I can handle that. But I can't figure out how to manipulate the content of elements with XSL. Any help is appreciated. Thanks!

Keith Gilbert
Adobe Certified Instructor: ID, IC, AI, PS, AA
blog.gilbertconsulting.com

Current Thread