0

I need to create XSL to translate escaped format special characters to normal format.

To be more specific, below is an example of the text with escaped format special characters:

<p attribute1='value 1' attribute2='value 2'> <ph attribute3='value 3' amp;gt;TEXT</ph> </p>

Here is the XML that I would like to produce from the above:

<p attribute1="value 1" attribute2="value 2"><ph attribute3="value 3">TEXT</ph></p>

Has anyone done anything like this before?

Thank you.

  • If all you want is unescape the string, you can output it using `disable-output-escaping`. – michael.hor257k Oct 06 '21 at 12:12
  • Is that input part of an XML document? Or part of a plain text document? Which rules were used to escape the input, is it kind of double escaped? – Martin Honnen Oct 06 '21 at 12:27
  • Even with double escaping, the part `attribute3='value 3' amp;gt;` seems to be wrong and would need to be `attribute3='value 3' &gt;`, to unescape it properly. – Martin Honnen Oct 06 '21 at 12:30

0 Answers0