title: replace substrings using lookup table with xslt
body: <p>I have a few strings containing a variant of Hexadecimal strings (source is framemaker if one would care). Strings could therefore look like </p>
  
  <blockquote>
    <p>this is some sentence with some hex code\x27 s , and we need that
    fixed.</p>
  </blockquote>
  
  <p>and will need to be changed to</p>
  
  <blockquote>
    <p>this is some sentence with some hex code's , and we need that fixed.</p>
  </blockquote>
  
  <p>In reality there can be a few of these in a single string, so I'm looking on the best way to walk through the text, capture all hex codes (looking like \x## ) and replace all of these codes with the correct character. I have made a xml list / lookup table containing all the characters as follows :</p>
  
  <pre><code>&lt;xsl:param name="reflist"&gt;
      &lt;Code Value="\x27"&gt;'&lt;/Code&gt;
  &lt;Code Value="\x28"&gt;(&lt;/Code&gt;
  &lt;Code Value="\x29"&gt;)&lt;/Code&gt;
  &lt;Code Value="\x2a"&gt;*&lt;/Code&gt;
  &lt;Code Value="\x2b"&gt;+&lt;/Code&gt;
      &lt;!-- much more like these... --&gt;
  &lt;/xsl:param&gt;
  </code></pre>
  
  <p>For now I used a simple replace argument but there are simply too many characters to make this workable.</p>
  
  <p>What's the best way to do this? </p>