-
Notifications
You must be signed in to change notification settings - Fork 3
Invoking Saxon from Java
timrdf edited this page Nov 1, 2014
·
19 revisions
This page describes how to apply grddl.xsl to an arbitrary (XML) file (e.g.) within a Java application.
-
Download -- see example code
S9APIExamples.java
-
Using s9api for Transformations outlines the steps:
- create new net.sf.saxon.s9api.Processor(false) (not licensed)
-
XsltCompiler compiler = processor.newXsltCompiler()
to create a XsltCompiler -
XsltCompiler.
compile(
StreamSource)
to produce an XsltExecutable. - StreamSource can be instantiate using "the usual", i.e. File, InputStream, Reader, and URL.