Main Page » Getting Started » External Libraries

External Libraries

The core JAR file of BaseX runs without external dependencies. Several features become available, or are improved, if an external library is found in the classpath. This page lists all libraries that are detected by BaseX.

The INFO command and db:system list the detected libraries in the Libraries section.

Bundled Libraries

The following libraries are included in the lib directory of the full distributions of BaseX (see Startup):

Library Feature Artifact
Igo Japanese tokenization: Full-Text Japanese jp.sourceforge.igo:igo
Jing RELAX NG and NVDL validation: Validation Functions org.relaxng:jing
JLine Interactive console: Command-Line Interface jline:jline
Lucene Stemmers, Snowball Full-text stemming: Full-Text org.apache:lucene-stemmers
Markup Blitz Invisible XML de.bottlecaps:markup-blitz
SLF4J Logging: LOG, Web Application org.slf4j:slf4j-simple
TagSoup HTML parsing: HTML Functions org.ccil.cowan.tagsoup:tagsoup
Validator.nu HTML parsing: HTML Functions nu.validator:htmlparser

Optional Libraries

The following libraries must be added manually:

Library Feature Artifact
Aircompressor Zstandard compression: Archive Functions, ADDARCHIVES io.airlift:aircompressor
chardet Charset detection of Validator.nu: HTML Functions net.sourceforge.jchardet:jchardet
FlatLaf Look and Feels: Graphical User Interface com.formdev:flatlaf
ICU4J Unicode collations: Full-Text; charset detection of Validator.nu: HTML Functions com.ibm.icu:icu4j
JTattoo Look and Feels: Graphical User Interface com.jtattoo:JTattoo
Saxon XSLT 3.0: XSLT Functions, fn:transform; XSD 1.1 validation (EE): Validation Functions net.sf.saxon:Saxon-HE, Saxonica
WordNet English stemming: Full-Text JWI
Xerces XSD 1.0 and 1.1 validation: Validation Functions Apache Xerces
XML Resolver Catalog resolution: Catalog Resolver org.xmlresolver:xmlresolver
XZ for Java XZ compression: Archive Functions, ADDARCHIVES org.tukaani:xz

Installation

Full Distributions

If you use the ZIP Package, the Windows Installer or the Web Archive, the bundled libraries are already included. Optional JAR files can be copied to the lib/custom directory; the Start Scripts add all files of this directory to the classpath.

Maven

The libraries are declared as optional dependencies of BaseX, so they are not added to your project automatically. To use a library, add it to the <dependencies> element of your project’s pom.xml file:

<dependency>
  <groupId>org.ccil.cowan.tagsoup</groupId>
  <artifactId>tagsoup</artifactId>
  <version>1.2.1</version>
</dependency>

Igo and Lucene Stemmers are available in the BaseX Maven Repository.

Debian

With Debian, TagSoup and Validator.nu will be detected after they have been installed via:

apt-get install libtagsoup-java libhtml5parser-java

Notes

Igo

The original project was hosted on OSDN, which has been shut down; the library is mirrored in the BaseX Maven repository. In addition to the library, a dictionary is required, as described in Full-Text Japanese.

Saxon

If Saxon is found, XSLT 3.0 is used instead of Java’s XSLT 1.0 processor. The Enterprise Edition is additionally used for XML Schema validation if a valid license key is found in the classpath. Saxon depends on the XML Resolver library, which must be added as well.

WordNet

In addition to the JWI library, the WordNet dictionary files must be placed in the etc/wndict directory, relative to the current working directory.

Xerces

The latest version of Xerces2 provides implementations of XML Schema 1.0 and 1.1. To use it, download a binary distribution and copy the following libraries to the classpath:

  • org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
  • cupv10k-runtime.jar
  • xercesImpl.jar
  • xml-apis.jar

⚡Generated with XQuery