com.thaiopensource.validate.schematron.NewSaxonSchemaReaderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jing Show documentation
Show all versions of jing Show documentation
Jing - tool for validating RelaxNG - (OSGi-compatible version)
package com.thaiopensource.validate.schematron;
import net.sf.saxon.lib.FeatureKeys;
import net.sf.saxon.TransformerFactoryImpl;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXTransformerFactory;
public class NewSaxonSchemaReaderFactory extends SchematronSchemaReaderFactory {
public SAXTransformerFactory newTransformerFactory() {
return new TransformerFactoryImpl();
}
public void initTransformerFactory(TransformerFactory factory) {
try {
factory.setAttribute(FeatureKeys.XSLT_VERSION, "2.0");
} catch (IllegalArgumentException e) {
// The old Saxon 9 (pre HE/PE/EE) throws this exception.
}
factory.setAttribute(FeatureKeys.LINE_NUMBERING, Boolean.TRUE);
factory.setAttribute(FeatureKeys.VERSION_WARNING, Boolean.FALSE);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy