BaseX offers two mechanisms to make new packages accessible to the XQuery processor:
# With {{Version|7.2.1}}, we offer a simple [[PackagingP#Packaging|packaging]] mechanism to directly install single XQuery and Java modules to the repository.# The [[Packaging#EXPath Packaging|EXPath Packaging]] system provides a generic mechanism for adding XQuery modules to query processors. A package is defined as a {{Mono|.xar}} archive, which encapsulates one or more extension libraries.
==Usage==
On our [http://files.basex.org/modules/ file server], you can find some example libraries packaged as XML archives (xar files). You can use them to try our packaging API or just as a reference for creating your own packages.
==URI Transformation==
If modules are looked up in the repository, their URIs are rewritten to a local file path. The URI transformation has been inspired by [http://www.zorba-xquery.com/html/documentation/latest/zorba/uriresolvers Zorba]:
# The URI authority is reversed, and its dots are replaced by slashes.
# The URI path is appended. If no path exists, a single slash is appended instead.
# If the resulting string ends with a slash, the {{Mono|index}} string is appended.
A package is rejected by the installer if it has an invalid syntax.
==Changelog==
===Version 7.2.1===
* Added: [[Packaging#Simple Packaging|Simple Packaging]]
===Version 7.1===