Difference between revisions of "Repository Module"

From BaseX Documentation
Jump to navigation Jump to search
Line 27: Line 27:
 
|}
 
|}
  
==pkg:list==
+
==repo:list==
 
{|
 
{|
 
|-
 
|-
 
| valign='top' width='90' | '''Signatures'''
 
| valign='top' width='90' | '''Signatures'''
|<code><b>pkg:list</b>() as xs:string*</code><br />
+
|<code><b>repo:list</b>() as xs:string*</code><br />
 
|-
 
|-
 
| valign='top' | '''Summary'''
 
| valign='top' | '''Summary'''
 
|Lists the names of all currently installed packages.<br />
 
|Lists the names of all currently installed packages.<br />
 
|}
 
|}

Revision as of 22:27, 24 January 2012

This module is introduced with BaseX Template:Mark. It contains XQuery functions for managing EXPath packages. All functions are preceded by the repo: prefix which is linked to the namespace http://basex.org/modules/repo. You can read more about BaseX implementation of the EXPath Packaging API here.

repo:install

Signatures repo:install($path as xs:string) as empty-sequence()
Summary Installs a package. The parameter $path indicates the path to the package.
Errors PACK0001 is raised if the package does not exist.
PACK0002 is raised if the package is already installed.
PACK0003 is raised if the package to be installed requires a package which is still not installed.
PACK0004 is raised if the package descriptor is invalid.
PACK0005 is raised if the module contained in the package to be installed is already installed as part of another package.
PACK0006 is raised if the package cannot be parsed.
PACK0009 is raised if the package version is not supported.
PACK0010 is raised if the package contains an invalid JAR descriptor.
PACK0011 is raised if the package contains a JAR descriptor but it cannot be read.

repo:delete

Signatures repo:delete($pkg as xs:string) as empty-sequence()
Summary Deletes a package. The parameter $pkg indicates either the package name as specified in the package descriptor or the name of the directory where the package is installed.
Errors PACK0007 is raised if the package cannot be deleted.
PACK0008 is raised if another package depends on the package to be deleted.

repo:list

Signatures repo:list() as xs:string*
Summary Lists the names of all currently installed packages.