> Do we have any way to replace ALL different characters in 
> String with other characters in ONE SINGLE shot?
> Example: I have a String "® ™" and the resulting 
> String should be "® ™". Which means 
> '®' should be replaced by '®', '™' should 
> be replaced by '™'.

Are you sure this is what you want to be doing??  

If you want the character reference to appear in your output, the usual
technique is to use an encoding that doesn't contain the character your
are referencing, thereby forcing the serialiser to output a reference.

For example, the stylesheet:

<xsl:stylesheet version="1.0" 
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output encoding="ascii"/>
<xsl:template match="/">
  &#174; &#8482;
</xsl:template>
</xsl:stylesheet>

Will output:

<?xml version="1.0" encoding="ascii"?>
  &#174; &#8482;

As the ascii encoding doesn't contain (r) and TM.

Alternatively, use any encoding you like and ensure the app you are
using to view the result of the transform is reading it in the same
encoding.  So if you are viewing the result in IE, use a <meta> tag to
specify the encoding (or just right click -> encoding to see whats going
on)

Maybe a sample xml, sample xslt and the result you need would explain
what youre after a little better

cheers
andrew

Reply via email to