Revision [500]

This is an old revision of CommandImport made by DavidLee on 2009-05-08 16:35:26.

 

import module [prefix=]module


The import command imports a module into the default namespace or a named namespace.
See the Modules section for a description of Extension Modules.
If prefix is omited then the module is imported into the default namespace.
If prefix is specified then the module is imported into the named prefix and commands are accessed by using the prefix.

"module" is either the name of an extension module or the path to the module.xml file.
For named modules, the XMODPATH variable is searched. For each directory in XMODPATH, a child directory is searched with the name of the module, and if found the file "module.xml" is searched for in that directory. If found then that module.xml file is used for the module configuration.

If a URL is specified for "module" it is assumed to be the module configuration file (typically named "module.xml" but could be any name.
When located, the fully expanded URL for the module configuration file is used as the base URI for any dependant files (e.g jar files in the class path). Both the module.xml and its Dependant jars can be local files or on the network.



Commands are found by looking in that package for classes that extend the XCommand abstract class.
Commands may also be xmlsh scripts as resources within the specified package (and end with the .xsh extension).

Example
$ import module xp=xproc
$ xp:xproc xprocfile.xpl
...


CommandsBuiltin
Modules

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki