Package org.apache.cocoon.sax.component

Examples of org.apache.cocoon.sax.component.XMLGenerator


public final class FopSerializerTestCase {

    @Test
    public void testPipelineWithFOPSerializer() throws Exception {
        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
        pipeline.addComponent(new XMLGenerator(this.getClass().getResource("page.xml")));
        pipeline.addComponent(new XSLTTransformer(this.getClass().getResource("page2fo.xsl")));
        pipeline.addComponent(new FopSerializer());

        File tmp = File.createTempFile("fop_test_case", ".pdf");
        FileOutputStream fos = new FileOutputStream(tmp);
View Full Code Here


        try {
            // a single ZipEntry in the ZipInputStream (see ReportJob)
            zis.getNextEntry();

            Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
            pipeline.addComponent(new XMLGenerator(zis));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("status", reportExec.getStatus());
            parameters.put("message", reportExec.getMessage());
            parameters.put("startDate", reportExec.getStartDate());
View Full Code Here

        Matcher schemaMatcher = SCHEMA_PATTERN.matcher(requestURI);

        Pipeline<SAXPipelineComponent> pipeline = new CachingPipeline<SAXPipelineComponent>();
        final String wadlURL = request.getRequestURL().
                substring(0, request.getRequestURL().indexOf("/doc")) + "/?_wadl";
        pipeline.addComponent(new XMLGenerator(new URL(wadlURL)));
        if ("/".equals(requestURI)) {
            XSLTTransformer xslt = new XSLTTransformer(getClass().getResource("/wadl2html/index.xsl"));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("contextPath", request.getContextPath());
View Full Code Here

        try {
            // a single ZipEntry in the ZipInputStream (see ReportJob)
            zis.getNextEntry();

            Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
            pipeline.addComponent(new XMLGenerator(zis));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("status", reportExec.getStatus());
            parameters.put("message", reportExec.getMessage());
            parameters.put("startDate", reportExec.getStartDate());
View Full Code Here

TOP

Related Classes of org.apache.cocoon.sax.component.XMLGenerator

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.