Package net.sf.saxon

Examples of net.sf.saxon.TransformerFactoryImpl


    super(name);
  }

    public void setUp() throws Exception{
      streamResultHolder = new CharArrayWriter()
        SAXTransformerFactory factory = new TransformerFactoryImpl();
    handler = factory.newTransformerHandler();
    handler.setResult(new StreamResult(streamResultHolder));
    handler.startDocument();
    }
View Full Code Here


   
    public DocumentInProgress(FileStore store, String encoding) throws TeiidComponentException{
      final FileStoreInputStreamFactory fsisf = new FileStoreInputStreamFactory(store, encoding);
        this.xml = new SQLXMLImpl(fsisf);
        this.xml.setEncoding(encoding);
        SAXTransformerFactory factory = new TransformerFactoryImpl();
        try {
      //SAX2.0 ContentHandler
      handler = factory.newTransformerHandler();
      handler.setResult(new StreamResult(fsisf.getOuputStream()));
    } catch (Exception e) {
      throw new TeiidComponentException(e);
    }
        transformer = handler.getTransformer();
View Full Code Here

        }
    }
   
    protected TransformerFactory createTransformerFactory() {
        if (getConfiguration() != null) {
            return new TransformerFactoryImpl(getConfiguration());
        } else {
            return new TransformerFactoryImpl();
        }
    }
View Full Code Here

//            System.setProperty("java.xml.transform.TransformerFactory", factoryName);
            TransformerFactory factory;
            if (sa) {
                factory = new EnterpriseTransformerFactory();
            } else {
                factory = new TransformerFactoryImpl();
            }
            Configuration config = ((TransformerFactoryImpl)factory).getConfiguration();
            if (lazy) {
                config.setLazyConstructionMode(true);
            }
View Full Code Here

    /**
     * Transform a document supplied via the pull interface
     */

    public void transform(PullProvider in, File stylesheet, OutputStream out) throws TransformerException {
        TransformerFactory factory = new TransformerFactoryImpl();
        Templates templates = factory.newTemplates(new StreamSource(stylesheet));
        Transformer transformer = templates.newTransformer();
        transformer.transform(
                new PullSource(in),
                new StreamResult(out)
        );
View Full Code Here

        }
    }
   
    protected TransformerFactory createTransformerFactory() {
        if (getConfiguration() != null) {
            return new TransformerFactoryImpl(getConfiguration());
        } else {
            return new TransformerFactoryImpl();
        }
    }
View Full Code Here

    public static Templates compileStylesheet(XPathContext context, DocumentInfo doc) throws XPathException {
        if (doc == null) {
            return null;
        }
        try {
            TransformerFactoryImpl factory = new TransformerFactoryImpl(context.getConfiguration());
            return factory.newTemplates(doc);
        } catch (TransformerConfigurationException e) {
            throw XPathException.makeXPathException(e);
        }

    }
View Full Code Here

        }
    }
   
    protected TransformerFactory createTransformerFactory() {
        if (getConfiguration() != null) {
            return new TransformerFactoryImpl(getConfiguration());
        } else {
            return new TransformerFactoryImpl();
        }
    }
View Full Code Here

    public static void serializerWithDOE()
            throws TransformerException,
                   SAXException, IOException, ParserConfigurationException {

        TransformerFactoryImpl tf = new TransformerFactoryImpl();

        // Following is needed to ensure Saxon recognizes the JAXP-defined processing instructions
        tf.setAttribute(FeatureKeys.USE_PI_DISABLE_OUTPUT_ESCAPING, Boolean.TRUE);
        TransformerHandler t = tf.newTransformerHandler();

        // Set some serialization options
        t.getTransformer().setOutputProperty("method", "xml");
        t.getTransformer().setOutputProperty("version", "1.1");
        t.getTransformer().setOutputProperty("encoding", "iso-8859-1");
View Full Code Here

//            System.setProperty("java.xml.transform.TransformerFactory", factoryName);
            TransformerFactory factory;
            if (sa) {
                factory = new EnterpriseTransformerFactory();
            } else {
                factory = new TransformerFactoryImpl();
            }
            Configuration config = ((TransformerFactoryImpl)factory).getConfiguration();
            if (lazy) {
                config.setLazyConstructionMode(true);
            }
View Full Code Here

TOP

Related Classes of net.sf.saxon.TransformerFactoryImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.