Skip to content

paulhoadley/DocBookInJar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

DocBookInJar

What is this?

DocBookInJar is merely a demonstration of one approach to running XSLT transformations on DocBook documents "out of the JAR". That is, we don't need the stylesheets on the filesystem: they're provided as resources in the JAR. This demonstration uses:

  • DocBook 1.79.2 stylesheets
  • Saxon-HE 12.3
  • Java 9

Getting started

To demonstrate that this approach works, you can clone this repository and run:

mvn clean test

That's it. It's just a proof of concept.

Using Java 8

The java-8 branch contains modifications to allow this demonstration to run under Java 8. The principal difference is how the URLStreamHandler is provided at runtime.

  • Java 9: ClasspathURLStreamHandlerProvider returns the URLStreamHandler, and is registered via META-INF/services.
  • Java 8: ClasspathURLStreamHandlerFactory returns the URLStreamHandler, and is registered via a call to URL.setURLStreamHandlerFactory().

Background

The motivation for doing this is described in a post to Stack Overflow. The approach itself, provided by Jukka Matilainen, is described in this comprehensive answer, and this pull request.

About

A demonstration of running the DocBook XSLT 1.x stylesheets "out of the JAR".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published