Package org.apache.cocoon.environment

Examples of org.apache.cocoon.environment.Source.toSAX()


        }

        Source source = null;
        try {
            source = this.sourceResolver.resolve(src);
            source.toSAX(getConsumer());
        } catch (Exception e) {
            getLogger().error("CachingCIncludeTransformer", e);
            throw new SAXException("CachingCIncludeTransformer could not read resource", e);
        } finally {
            if (source != null) source.recycle();
View Full Code Here


        }

        Source source = null;
        try {
            source = this.sourceResolver.resolve(src);
            source.toSAX(consumer);
        } catch (IOException e) {
            getLogger().error("CIncludeTransformer", e);
            throw new SAXException("CIncludeTransformer could not read resource", e);
        } catch (ProcessingException e){
            getLogger().error("Could not stream input", e);
View Full Code Here

        Source input = null;
        try {
            input = this.getSource(uri, typeParameters, resourceParameters);

            if (input != null) {
                input.toSAX(filter);
            }
        } finally {
            if (input != null) input.recycle();
            input = null;
        }
View Full Code Here

            DOMBuilder builder = new DOMBuilder();
            builder.startDocument();
            builder.startElement("", "sunShine", "sunShine", this.emptyAttributes);

            IncludeXMLConsumer filter = new IncludeXMLConsumer(builder, builder);
            input.toSAX(filter);

            builder.endElement("", "sunShine", "sunShine");
            builder.endDocument();

            // Create Document Fragment
View Full Code Here

        Source input = null;
        try {
            input = this.resolver.resolve(fileName);

            IncludeXMLConsumer filter = new IncludeXMLConsumer(contentHandler, lexicalHandler);
            input.toSAX(filter);

        } catch (SAXException sax) {
            throw new ProcessingException("SAXException: " + sax, sax);
        } catch (IOException ioe) {
            throw new ProcessingException("IOException: " + ioe, ioe);
View Full Code Here

        IncludeXMLConsumer filter = new IncludeXMLConsumer(contentHandler, lexicalHandler);

        Source input = null;
        try {
            input = this.getSource(uri, typeParameters, resourceParameters);
            input.toSAX(filter);
        } finally {
            if (input != null) input.recycle();
            input = null;
        }
View Full Code Here

            ls.setOutputStream(this.stream);

            Source redirectSource = null;
            try {
                redirectSource = this.resolve(newURL);
                redirectSource.toSAX(ls);
            } catch (SAXException se) {
                throw new IOException("SAXException: " + se);
            } catch (ProcessingException pe) {
                throw new IOException("ProcessingException: " + pe);
            } finally {
View Full Code Here

        }

        Source source = null;
        try {
            source = this.sourceResolver.resolve(src);
            source.toSAX(getConsumer());
        } catch (Exception e) {
            getLogger().error("CachingCIncludeTransformer", e);
            throw new SAXException("CachingCIncludeTransformer could not read resource", e);
        } finally {
            if (source != null) source.recycle();
View Full Code Here

       
        base = (base == null? "" : base);
        Source source = null;
        try {
            source = resolver.resolve(base+uri);
            source.toSAX(new org.apache.cocoon.xml.IncludeXMLConsumer(contentHandler));
          } catch (Exception e) {
              throw new CascadingRuntimeException("Error including source "+base+" "+uri, e);
          } finally {
              if (source != null)
                 source.recycle();
View Full Code Here

                    if (conf == null) {
                        conf = new ConfigurationHelper();
                    }

                    SAXConfigurationHandler builder = new SAXConfigurationHandler();
                    source.toSAX(builder);

                    conf.lastModified = source.getLastModified();
                    conf.configuration = builder.getConfiguration();

                    XSPFormValidatorHelper.cacheConfiguration(source.getSystemId(), conf);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.