Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final String XSLT_TRANSFORMER_FACTORY = "javax.xml.transform.TransformerFactory";
    public static final String SAXON_TRANSFORMER_FACTORY = "net.sf.saxon.TransformerFactoryImpl";

    public static void setUseSaxonTransformFactory() {
        if (System.getProperty(XSLT_TRANSFORMER_FACTORY) == null) {
            System.setProperty(XSLT_TRANSFORMER_FACTORY, SAXON_TRANSFORMER_FACTORY);
        } else {
            throw new IllegalStateException(XSLT_TRANSFORMER_FACTORY + " is already set");
        }
    }
}