Commit bc8fa8aa authored by Gerrit Hübbers's avatar Gerrit Hübbers 🃏
Browse files

Make Xslt-based OAI-PMH bundles source explicitly use Saxon XSLT transformer

parent 4a64f695
......@@ -480,6 +480,11 @@
<artifactId>xalan</artifactId>
<version>2.7.2</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.8.0-14</version>
</dependency>
<dependency>
<groupId>com.neovisionaries</groupId>
<artifactId>nv-i18n</artifactId>
......
......@@ -18,13 +18,13 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.apache.xalan.processor.TransformerFactoryImpl;
import org.gesis.dda.publishing.domain.Bundle;
import org.gesis.dda.publishing.domain.BundlesStreamSource;
import org.gesis.dda.xslt.XsltUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.sf.saxon.TransformerFactoryImpl;
public class XmlXsltBundlesStreamSource implements BundlesStreamSource {
......
......@@ -42,6 +42,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.InputSource;
import net.sf.saxon.TransformerFactoryImpl;
public class XsltTransformerOaiPmhBundlesStreamSource implements BundlesStreamSource {
......@@ -157,7 +158,7 @@ public class XsltTransformerOaiPmhBundlesStreamSource implements BundlesStreamSo
}
else {
// --- STEP 2: convert XML input according to XSLT
TransformerFactory factory = TransformerFactory.newInstance();
TransformerFactory factory = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", TransformerFactoryImpl.class.getClassLoader() );
Templates xslTemplate = factory.newTemplates(
new StreamSource(
new StringReader(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment