title: Is it possible to dynamically declare a default namespace from an external variable?
body: <p>For all XQuery queries I execute, I define a default element namespace, like so:</p>
  
  <pre><code>declare default element namespace 'http://example.com';
  (: rest of the query :)
  </code></pre>
  
  <p>But to hardcode this namespace is kind of cumbersome. Can I dynamically define a default namespace, from an external variable?</p>
  
  <p>It tried:</p>
  
  <pre><code>declare default element namespace $namespace;
  (: error: Expecting quote, found '$'. :)
  </code></pre>
  
  <p>.. and:</p>
  
  <pre><code>declare variable $namespace external;
  declare default element namespace $namespace;
  (: error: Default declarations must be declared first. :)
  </code></pre>
  
  <p>... but they don't work, unfortunately.</p>
  
  <hr>
  
  <p>I'm currently using BaseX 7.7.2, by the way.</p>