HI I have a scenario where I need to remove special characters as well as Latin Characters. I was able to strip out Latin and few special characters. But for some reason, ™ is getting converted to TM. How do I remove that using xslt? Here is my code and function
<Last_Name xtt:fixedLength="30" xtt:required="true" xtt:severity="error" xtt:align="left"><xsl:value-of select="lancet:stripSpecialChars(replace(normalize-unicode(translate(wd:Last_Name, ',', ''), 'NFKD'), '⁄', '/'))"/></Last_Name>
function
<xsl:function name="lancet:stripSpecialChars">
<xsl:param name="string" />
<xsl:variable name="AllowedSymbols" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()*%$#@!~<>™,.?[]=- + /\ '"/>
<xsl:value-of select="replace(normalize-unicode($string, 'NFKD'), '\P{IsBasicLatin}', '')"/>
What am I expecting?
INPUT: DE’ERIKA
OUTPUT: (Right Now with my code) -> DEATMERIKA
EXPECTED OUTPUT: DEAERIKA (My code is eliminating Latin characters and few symbols)