Package org.apache.fop.util

Examples of org.apache.fop.util.DefaultErrorListener


     * @throws TransformerException if an error occurs while parsing the area tree XML
     */
    public void parse(Source src, AreaTreeModel treeModel, FOUserAgent userAgent)
            throws TransformerException {
        Transformer transformer = tFactory.newTransformer();
        transformer.setErrorListener(new DefaultErrorListener(log));
       
        SAXResult res = new SAXResult(getContentHandler(treeModel, userAgent));

        transformer.transform(src, res);
    }
View Full Code Here


    }

    private Document getDocument(InputStream in) throws TransformerException {
        TransformerFactory tFactory = TransformerFactory.newInstance();
        //Custom error listener to minimize output to console
        ErrorListener errorListener = new DefaultErrorListener(log);
        tFactory.setErrorListener(errorListener);
        Transformer transformer = tFactory.newTransformer();
        transformer.setErrorListener(errorListener);
        Source source = new StreamSource(in);
        DOMResult res = new DOMResult();
View Full Code Here

     * @throws TransformerException if an error occurs while parsing the area tree XML
     */
    public void parse(Source src, AreaTreeModel treeModel, FOUserAgent userAgent)
            throws TransformerException {
        Transformer transformer = tFactory.newTransformer();
        transformer.setErrorListener(new DefaultErrorListener(log));
       
        SAXResult res = new SAXResult(getContentHandler(treeModel, userAgent));

        transformer.transform(src, res);
    }
View Full Code Here

     */
    public void parse(Source src, IFDocumentHandler documentHandler, FOUserAgent userAgent)
            throws TransformerException, IFException {
        try {
            Transformer transformer = tFactory.newTransformer();
            transformer.setErrorListener(new DefaultErrorListener(log));

            SAXResult res = new SAXResult(getContentHandler(documentHandler, userAgent));

            transformer.transform(src, res);
        } catch (TransformerException te) {
View Full Code Here

            try {
                Fop fop = fopFactory.newFop(MimeConstants.MIME_PNG, userAgent, out);
                SAXResult res = new SAXResult(fop.getDefaultHandler());

                Transformer transformer = getTransformer(context);
                transformer.setErrorListener(new DefaultErrorListener(log));
                transformer.transform(new StreamSource(src), res);
            } finally {
                IOUtils.closeQuietly(out);
            }
View Full Code Here

                try {
                    Fop fop = fopFactory.newFop(getTargetFormat(), userAgent, out);
                    SAXResult res = new SAXResult(fop.getDefaultHandler());

                    Transformer transformer = getTransformer(context);
                    transformer.setErrorListener(new DefaultErrorListener(log));
                    transformer.transform(new StreamSource(src), res);
                } finally {
                    IOUtils.closeQuietly(out);
                }
View Full Code Here

     * @throws TransformerException if an error occurs while parsing the area tree XML
     */
    public void parse(Source src, AreaTreeModel treeModel, FOUserAgent userAgent)
            throws TransformerException {
        Transformer transformer = tFactory.newTransformer();
        transformer.setErrorListener(new DefaultErrorListener(log));

        SAXResult res = new SAXResult(getContentHandler(treeModel, userAgent));

        transformer.transform(src, res);
    }
View Full Code Here

                try {
                    Fop fop = fopFactory.newFop(getTargetFormat(), userAgent, out);
                    SAXResult res = new SAXResult(fop.getDefaultHandler());

                    Transformer transformer = getTransformer(context);
                    transformer.setErrorListener(new DefaultErrorListener(log));
                    transformer.transform(new StreamSource(src), res);
                } finally {
                    IOUtils.closeQuietly(out);
                }
View Full Code Here

            try {
                Fop fop = fopFactory.newFop(MimeConstants.MIME_PNG, userAgent, out);
                SAXResult res = new SAXResult(fop.getDefaultHandler());

                Transformer transformer = getTransformer(context);
                transformer.setErrorListener(new DefaultErrorListener(log));
                transformer.transform(new StreamSource(src), res);
            } finally {
                IOUtils.closeQuietly(out);
            }
View Full Code Here

     * @throws TransformerException if an error occurs while parsing the XML file
     */
    public static EventModel parse(Source src)
            throws TransformerException {
        Transformer transformer = tFactory.newTransformer();
        transformer.setErrorListener(new DefaultErrorListener(LOG));

        EventModel model = new EventModel();
        SAXResult res = new SAXResult(getContentHandler(model));

        transformer.transform(src, res);
View Full Code Here

TOP

Related Classes of org.apache.fop.util.DefaultErrorListener

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.