Changes

Jump to navigation Jump to search
512 bytes added ,  09:05, 1 April 2012
If an XQuery file is specified as input for the install command, it will be parsed as XQuery module. If parsing was successful, the module URI will be [[#URI Rewriting|rewritten]] to a file path and attached with the {{Mono|.xqm}} file suffix, and the original file will be copied to that path into the repository.
 
'''Example:'''
 
Contents of the file {{Mono|hello-world.xq}}:
 
```xquery
module namespace module = 'http://basex.org/modules/hello/World';
declare function module:hello($world) { 'Hello ' || $world };
```
 
Repository destination path:
 
org/basex/modules/hello/World.xqm
 
After installing the module, all of the following URIs can then be used in XQuery to import this module or call its functions:
 
```xquery
import module namespace module='http://basex.org/modules/hello/World';
module:hello('Universe')
```
===Java===
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu