Revision [1932]

Last edited on 2014-08-15 18:28:56 by DavidLee
Additions:
Commands that are already in the CLASSPATH may be imported by specifying just the package name using the "import package" command. A namespace prefix may be provided and optionally a symbolic name may be specified.
To reference xmlsh internal commands not imported by default use the "import commands" statement so that your script is not dependant on knowing the specific package name of internal commands.
Example, to import commands from com.mycompany.commands package already in the class path
import package mycommands=com.mycompany.commands
To simplify importing sets of commands internal to xmlsh but not imported by default, the "import commands" command may be used.
This is equivalent to using "import package" using the full package name, but does not depend on version changes which may rename internal packages.
Deletions:
Commands that are already in the CLASSPATH (such as those builtin to xmlsh) may be imported by specifying just the package name using the "import package" command. A namespace prefix may be provided and optionally a symbolic name may be specified
import package posix=org.xmlsh.commands.posix
To simplify importing sets of commands in the org.xmlsh.commands package, the "import commands" command may be used.
This is equivalent to using "import package" giving "org.xmlsh.commands." as the prefix to the command.


Revision [1536]

Edited on 2010-11-11 16:58:36 by DavidLee
Additions:
For example, [[CommandXsql xsql]], [[CommandJset jset]], [[CommandJset jcall]], [[FunctionJnew jnew]].
Deletions:
For example, [[CommandXsql xsql], [[CommandJset jset]], [[CommandJset jcall]], [[FunctionJnew jnew]].


Revision [1535]

Edited on 2010-11-11 16:58:19 by DavidLee
Additions:
import java url [url ...]
====Description Java====
The shell's classpath can be extended by using the "import java" command. With no further arguments it prints the current classpath. Arguments are added to the classpath. They can be any URI, but typically will be paths to jar files. Relative paths are resolved against the current directory.
The classpath of the current shell is used as the base classpath for any commands which dynamically load java classes.
For example, [[CommandXsql xsql], [[CommandJset jset]], [[CommandJset jcall]], [[FunctionJnew jnew]].
Print the current classpath
import java
Add myfile.jar to the classpath
import java myfile.jar


Revision [1006]

Edited on 2009-11-25 11:23:01 by DavidLee
Additions:
XMODPATH=/usr/local/xmlsh/ext
import module xp=calabsh
xp:xproc xprocfile.xpl
import module ml=/usr/local/marklogic/module.xml
ml:list
import module ml=http://test.xmlsh.org/modules/marklogic/module.xml
Deletions:
$ XMODPATH=/usr/local/xmlsh/ext
$ import module xp=calabsh
$ xp:xproc xprocfile.xpl
$ import module ml=/usr/local/marklogic/module.xml
$ ml:list
$ import module ml=http://test.xmlsh.org/modules/marklogic/module.xml


Revision [1005]

Edited on 2009-11-25 11:22:39 by DavidLee
Additions:
[[CategoryCommands]]


Revision [860]

Edited on 2009-11-22 07:15:09 by DavidLee
Additions:
[[Commands]]
Deletions:
[[CommandsStandard]]


Revision [747]

Edited on 2009-09-16 07:48:49 by DavidLee
Additions:
[[CommandsStandard]]
Deletions:
[[CommandsBuiltin]]


Revision [723]

Edited on 2009-09-09 10:28:03 by DavidLee
Additions:
import package [prefix=]package [ [prefix=]package ...]
import commands [prefix=]command-subpackage [ [prefix=]command-subpackage ...]
Deletions:
import package [prefix=]package [[prefix=]package ...]
import commands [prefix=]command-subpackage [[prefix=]command-subpackage ...]


Revision [627]

Edited on 2009-06-16 17:26:01 by DavidLee
Additions:
import package [prefix=]package [[prefix=]package ...]
import commands [prefix=]command-subpackage [[prefix=]command-subpackage ...]
You can group commands together to include multiple command sets
import commands posix experimental
Deletions:
import package [name] [prefix=]package
import commands [name] [prefix=]command-subpackage


Revision [578]

Edited on 2009-05-29 06:20:46 by DavidLee
Additions:
======Command import======
====Name====
**import** imports a module or package into the default namespace or a named namespace.
====Synopsis====
import module [prefix=]module
import package [name] [prefix=]package
import commands [name] [prefix=]command-subpackage
====Description Modules====
====Description Packages====
Commands that are already in the CLASSPATH (such as those builtin to xmlsh) may be imported by specifying just the package name using the "import package" command. A namespace prefix may be provided and optionally a symbolic name may be specified
Example, to import the posix commands using the full package name and specifying the posix prefix
import package posix=org.xmlsh.commands.posix
====Description Commands====
To simplify importing sets of commands in the org.xmlsh.commands package, the "import commands" command may be used.
This is equivalent to using "import package" giving "org.xmlsh.commands." as the prefix to the command.
Example, to import the posix commands using the full package name and specifying the posix prefix
import commands posix=posix
Example to import the experimental commands into the global namespace
import commands experimental
Deletions:
======import module [prefix=]module======


Revision [501]

Edited on 2009-05-08 16:38:49 by DavidLee
Additions:
Load module calabash from /usr/local/xmlsh/calabash
$ XMODPATH=/usr/local/xmlsh/ext
$ import module xp=calabsh
Load module marklogic from /usr/local/markogic/module.xml
$ import module ml=/usr/local/marklogic/module.xml
$ ml:list
Load module marklogic from a remote host at http://test.xmlsh.org/modules/marklogic/module.xml
where all jar files are located remotely
$ import module ml=http://test.xmlsh.org/modules/marklogic/module.xml
Deletions:
$ import module xp=xproc


Revision [500]

Edited on 2009-05-08 16:35:26 by DavidLee
Additions:
======import module [prefix=]module======
"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.
$ import module xp=xproc
Deletions:
======import module [prefix=]uri ======
Module is a java package that must already exist in the CLASSPATH of the current VM.
$ import module xp=org.xmlsh.xproc


Revision [321]

Edited on 2008-12-19 04:36:05 by DavidLee
Additions:
See the [[Modules]] section for a description of Extension Modules.
[[Modules]]


Revision [316]

The oldest known version of this page was created on 2008-12-09 13:41:21 by DavidLee
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki