I'm trying to come up with a good way of replacing special characters such as ã, û, ü etc with their base alphabet in BizTalk. Currently I'm using the following XSL form:
<xsl:template match="text()">
<xsl:call-template name="ReplaceChars">
<xsl:with-param name="Input" select="."></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:variable name="OddChars">ÄÖÅÜÉäöåüé</xsl:variable>
<xsl:variable name="RegChars">AOAUEaoaue</xsl:variable>
<!-- Replaces odd characters with regular ones -->
<xsl:template name="ReplaceChars">
<xsl:param name="Input" />
<xsl:value-of select="translate($Input, $OddChars, $RegChars)"/>
</xsl:template>
The above is working just fine. My question is this: is there a better or "smarter" way of doing this? I can't find anything sensible with google. I was thinking using .Net inline code of simply forcing another culture on the text, to automatically strip the special signs from the base characters. But I can't seem to get that working either.
Basically, I don't want to create an app where you'd have to constantly update the character list and risk a new special character that isn't defined, getting through and causing errors on the receiving app. But do I have a choice?