title: Using XSLT to translate an XML file
body: <p>I want to translate a given XML file (it is a RelaxNG grammar) to other languages via XSLT. Suppose the XML file is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;grammar&gt;
    &lt;element name="table" /&gt;
    &lt;element name="chair" /&gt;
  &lt;/grammar&gt;
  </code></pre>
  
  <p>Now I was thinking of having an XSLT stylesheet with the information like </p>
  
  <pre><code>en=table, de=Tisch, fr=table
  en=chair, de=Stuhl, fr=chaise
  ...  (there will be many, many more entries)
  </code></pre>
  
  <p>But I could also put this information in to an external file (I am starting from scratch). Can you give me advice how to formulate an XSLT? I was thinking of using <code>&lt;xsl:key&gt;</code> for this but I never get the hang of keys in XSLT. The result should look like this, when I create the German translation:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;grammar lang="de"&gt;
    &lt;element name="Tisch" /&gt;
    &lt;element name="Stuhl" /&gt;
  &lt;/grammar&gt;
  </code></pre>