===XQuery (with files)===
XQuery userUser-defined library modules and scripts can be imported and used as follows:
;Contents of the file library module <code>[http://files.basex.org/modules/org/basex/modules/Hello/HelloWorld.xqm HelloWorld.xqm]</code> (comments removed):
<pre class="brush:xquery">
</pre>
;XQuery file <code>HelloUniverse.xq</code>. Note The specified module path is relative to the location (i.e., ''at static base URI'HelloWorld.xqm'''.) of the calling module:
<pre class="brush:xquery">
m:hello("Universe")
</pre>
===XQuery (with REPO INSTALL) ===