Changes

Jump to navigation Jump to search
114 bytes removed ,  13:01, 6 July 2018
==Accessing Modules==
Library modules can be imported with the {{Code|import module}} statement,followed by a freely choosable prefix and the namespace of the target module.The specified location may be absolute or relative; in the latter case, it is resolvedagainst the location (i.e., ''static base URI'') of the calling module.Import module statements must be placed at the beginning of a module:
'''Main Module''' <code>hello-universe.xq</code>:
</pre>
If no location is supplied, modules will be looked up in the repository. Repository modules are stored in a directory named {{Code|BaseXRepo}} or the {{Code|repo}}directory, which resides in your [[Configuration#Home Directory|home directory]]. XQuery modules can be manually copied to the repository directory or installed and deleted via [[#Commands|commands]].
If a module has been placed in the repository (see below), there is no need to specify the location. The following example calls a function from the FunctX modulein the repository:
<pre class="brush:xquery">
===Additional Libraries===
 
{{Mark|Introduced with Version 9.0:}}
A Java class may depend on additional libraries. The dependencies can be resolved by creating a fat JAR file, i.e., extracting all files of the library archives and producing a single, flat JAR package.
==Combined==
 
{{Mark|Introduced with Version 9.0:}}
It makes sense to combine the advantages of XQuery and Java packages:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu