-
Notifications
You must be signed in to change notification settings - Fork 0
Integration
This project uses the XSLT Package Handler.
Note: There is a more detailed but general description how to include modules using the XSLT Package Handler here. The following description is just a summary of the important points inclusive the project specific informations and adjustments.
Add to your Maven pom.xml:
<dependencies>
[...]
<dependency>
<groupId>com.nkutsche</groupId>
<artifactId>xmlml</artifactId>
<version>{xmlml.project.version}</version>
</dependency>
<dependency>
<groupId>com.nkutsche</groupId>
<artifactId>xslt-pkg-managerXXX</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
IMPORTANT: Replace XXX with 100, 110 or 120 depending on if you use Saxon 10.x, 11.x or 12.x in your project.
You can download the zip package xmlml-...-lib.zip from the release page of this project. The zip package includes
- all required jar files
- a Saxon 12
- a matching XSLT Package Handler
Add all the contained jars to your Java classpath.
There is a another ZIP package xmlml-...-sample.zip that includes an executable sample inclusive an XSLT script which demonstrates some use cases of using the X(ml)² library.
- Check that all dependency jars are in your classpath. This includes the project jar (
xmlml-X.Y.Z.jar) and those from the Package Manager (e.g.xslt-pkg-manager100-2.0.0.jar, ...). Usually Maven should manage this for you. - Add to your Saxon call the argument
-init:com.nkutsche.xslt.pkg.handler.PackageManager.
Sample:
java -cp $classpath net.sf.saxon.Transform -init:com.nkutsche.xslt.pkg.handler.PackageManager ...Add to your Main stylesheet the following on top level:
<xsl:use-package name="http://www.nkutsche.com/xmlml" package-version="*"/>On the Function API page you will find the available functions provided by this package.
In case you want to use the XPath evaluation module, you have to add an addition xsl:use-package:
<xsl:use-package name="http://www.nkutsche.com/xmlml/xpath" package-version="*"/>