Changes

Jump to navigation Jump to search
636 bytes added ,  11:50, 14 June 2013
adds an explanation on how to include and use other scripts and modules
==Packaging==
===XQuery(with files)=== XQuery user-defined modules and scripts can be imported and used as follows:  Contents of the file <code>[http://files.basex.org/modules/org/basex/modules/Hello/HelloWorld.xqm HelloWorld.xqm]</code> (comments removed): <pre class="brush:xquery">module namespace m = 'http://basex.org/modules/Hello';declare function m:hello($world) { 'Hello ' || $world};</pre>  XQuery file <code>HelloUniverse.xq</code>. Note the ''at 'HelloWorld.xqm'''. <pre class="brush:xquery">import module namespace m = 'http://basex.org/modules/Hello' at 'HelloWorld.xqm';m:hello("Universe")</pre>   ===XQuery (with REPO INSTALL) ===
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 {{Code|.xqm}} file suffix, and the original file will be renamed and copied to that path into the repository.
administrator, editor
1

edit

Navigation menu