title: Encrypt string from XML within XSLT Stylesheet
body: <p>Is it possible to encrypt a string in an XML dokument when applying an XSLT stylesheet? </p>
  
  <p>This is a template I use:</p>
  
  <pre><code>&lt;xsl:template match="*"&gt;
      &lt;div class="tgPropertyInput tgLangDE"&gt;
          &lt;div class="tgLabel" id="{local-name()}"&gt;
              &lt;xsl:value-of select="local-name()"/&gt;
          &lt;/div&gt;
          &lt;div lang="de" contentEditable="true" class="tgInput" id="{concat(local-name(), '_input')}"&gt;
              &lt;xsl:value-of select="."/&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>The content of <code>&lt;xsl:value-of select="."/&gt;</code> is what I want to encrypt in a way that I can decrypt it within javascript. The Idea behind this is that I generate persisted HTML versions of an XML file. These are used internally but potentially send to some customers. Some of the fields should not be readable by the customer. So I would encrypt them and have the script for decryption on a local server.</p>