I have got the following content in my XML:
Cats' eyes
When I use the following code in my
Your first problem is that it appears your content has been "double escaped". The entity for an apostrophe is '
, not '
.
Your attempt to replace characters with translate() did not work, because it works differently than you are expecting. It is not a find/replace method. You specify a list of characters in the second argument and then the corresponding character to translate each one into in the third parameter. If there is no corresponding character in the list of characters in the third parameter then it will be removed.
You will need to use a recursive template to perform the character replacement.
For example:
Of course, with XSLT 2.0 you could just use the replace() function: