title: How to make resource language attribute dynamic in Orbeon Forms?
body: <p>In my model i define an instance related to form-resources.</p>
  
  <p>I want to set "xml:lang" value dynamically by a xpath expr in a variable.</p>
  
  <p>I tried but the xml:lang attribute of resource element isn't evaluating the variable, but instead it recognises it as string! (xml:lang="$language")</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>...
  &lt;xf:model id="fr-form-model" xxf:expose-xpath-types="true"&gt;
    &lt;xf:var name="language" value="de" as="xs:string" /&gt;
    ...
    &lt;xf:instance id="fr-form-resources" xxf:readonly="false"&gt;
      &lt;resources&gt;
        &lt;!-- How "xml:lang" attribute can have dynamic value 
            from a variable/xpath instead of static string 'de' ? --&gt;
        &lt;resource xml:lang="de"&gt;
          &lt;IntegerField&gt;
            &lt;label&gt;%translation.IntegerField%&lt;/label&gt;
            &lt;IntegerField /&gt;
            &lt;/Project&gt;
            &lt;cancel&gt;
              &lt;label&gt;%translation.cancel%&lt;/label&gt;
              &lt;hint /&gt;
            &lt;/cancel&gt;
            &lt;ok&gt;
              &lt;label&gt;%translation.ok%&lt;/label&gt;
              &lt;hint /&gt;
            &lt;/ok&gt;
        &lt;/resource&gt;
      &lt;/resources&gt;
    &lt;/xf:instance&gt;
  &lt;/xf:model&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there any way to achieve this?</p>
  
  <p><em>Using Orbeon 4.5</em></p>