Package org.apache.cocoon.sax.component

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


     */
    public LinkedSAXPipelineComponentBuilder setNodeGenerator(Node node) {
        if (node == null) {
            throw new IllegalArgumentException("Parameter 'node' must be not null");
        }
        return this.setStarter(new XMLGenerator(node));
    }
View Full Code Here


     */
    public LinkedSAXPipelineComponentBuilder setSAXBufferGenerator(SAXBuffer saxBuffer) {
        if (saxBuffer == null) {
            throw new IllegalArgumentException("Parameter 'saxBuffer' must be not null");
        }
        return this.setStarter(new XMLGenerator(saxBuffer));
    }
View Full Code Here

     */
    public LinkedSAXPipelineComponentBuilder setStringGenerator(String xmlString) {
        if (xmlString == null) {
            throw new IllegalArgumentException("Parameter 'xmlString' must be not null");
        }
        return this.setStarter(new XMLGenerator(xmlString));
    }
View Full Code Here

     */
    public LinkedSAXPipelineComponentBuilder setURLGenerator(URL url) {
        if (url == null) {
            throw new IllegalArgumentException("Parameter 'url' must be not null");
        }
        return this.setStarter(new XMLGenerator(url));
    }
View Full Code Here

    @Test
    public void testPipelineWithSolrConsumer() throws Exception {
        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();

        pipeline.addComponent(new XMLGenerator(this.getClass().getResource("sample.xml")));
        pipeline.addComponent(new SolrConsumer(this.solr));
        pipeline.addComponent(new XMLSerializer());

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        pipeline.setup(baos);
View Full Code Here

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

        pipeline.execute();
    }

    private Pipeline<SAXPipelineComponent> createValidatingPipeline(String xmlInput) {
        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
        pipeline.addComponent(new XMLGenerator(xmlInput));
        pipeline.addComponent(new SchemaProcessorTransformer(this.getClass().getResource("/test.xsd")));
        pipeline.addComponent(new XMLSerializer());

        return pipeline;
    }
View Full Code Here

        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put("translet-name", "CompiledXslt");
        attributes.put("package-name", "org.apache.cocoon.sax");

        newCachingPipeline()
            .setStarter(new XMLGenerator("<x></x>"))
            .addComponent(new XSLTTransformer(this.getClass().getResource("/test.xslt"), attributes))
            .setFinisher(new XMLSerializer())
            .withEmptyConfiguration()
            .setup(baos)
            .execute();
View Full Code Here

     * A pipeline that performs a simple transformation: generator -&gt; transformer -&gt;
     * serializer.
     */
    public void testPipelineWithTransformer() throws Exception {
        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
        pipeline.addComponent(new XMLGenerator("<x></x>"));
        pipeline.addComponent(new XSLTTransformer(this.getClass().getResource("/test.xslt")));
        pipeline.addComponent(new XMLSerializer());

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        pipeline.setup(baos);
View Full Code Here

        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put("translet-name", "CompiledXslt");
        attributes.put("package-name", "org.apache.cocoon.sax");

        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
        pipeline.addComponent(new XMLGenerator("<x></x>"));
        pipeline.addComponent(new XSLTTransformer(this.getClass().getResource("/test.xslt"), attributes));
        pipeline.addComponent(new XMLSerializer());

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        pipeline.setup(baos);
View Full Code Here

TOP

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

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.