title: xquery (eXist-db) - imported module not found
body: <p>I have a file "globalvar.xql" which contains what I hope can be a central document for all my non-varying variables (parameters really).</p>
  
  <p>In order to use these, I understand that I have to declare/import the module into any other document that will use them. In this case, I want to use them in the functions found in "person.xql". As such, I have tried a declaration:</p>
  
  <pre><code>import module namespace globalvar="/db/apps/deheresi/modules/globalvar.xqm";
  </code></pre>
  
  <p>But I get the error message when I validate:</p>
  
  <pre><code>Cannot compile xquery: exerr:ERROR error found while loading module globalvar: Error while loading module /db/apps/deheresi/modules/globalvar.xqm: namespace URI declared by module (/db/apps/deheresi/modules/globalvar) does not match namespace URI in import statement, which was: /db/apps/deheresi/modules/globalvar.xqm
  </code></pre>
  
  <p>Error, code and directory are picture below.</p>
  
  <p>I've been trying to imitate the code found in the eXist-db demos, and looking at other resources, but the error is mystifying me.</p>
  
  <p>Many thanks.</p>
  
  <p><a href="https://i.stack.imgur.com/VXFAq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VXFAq.png" alt="Screen shot of code and error"></a></p>