Package org.apache.cocoon.xml.dom

Examples of org.apache.cocoon.xml.dom.DOMBuilder.startElement()


            this.getLogger().debug("BEGIN startRecording");
        }
        DOMBuilder builder = new DOMBuilder();
        this.addRecorder(builder);
        builder.startDocument();
        builder.startElement("", "cocoon", "cocoon", new AttributesImpl());

        this.sendStartPrefixMapping();

        if (this.getLogger().isDebugEnabled()) {
            this.getLogger().debug("END startRecording");
View Full Code Here


            getLogger().debug("Start recording");
        }
        DOMBuilder builder = new DOMBuilder(this.tfactory);
        addRecorder(builder);
        builder.startDocument();
        builder.startElement("", "cocoon", "cocoon", EMPTY_ATTRIBUTES);
        sendStartPrefixMapping();
    }

    /**
     * Stop DOM DocumentFragment recording.
View Full Code Here

            InputSource input = new InputSource(reader);

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

            IncludeXMLConsumer filter = new IncludeXMLConsumer(builder, builder);
            parser.parse(input, filter);

            builder.endElement("", "sunShine", "sunShine");
View Full Code Here

        DocumentFragment recordedDocFrag = null;
        DOMBuilder       builder;

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

        IncludeXMLConsumer filter;
        // Test for url rewriting
        if (typeParameters != null
            && typeParameters.getParameter(URLRewriter.PARAMETER_MODE, null) != null) {
View Full Code Here

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

            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");
View Full Code Here

            this.getLogger().debug("BEGIN startRecording");
        }
        DOMBuilder builder = new DOMBuilder();
        this.addRecorder(builder);
        builder.startDocument();
        builder.startElement("", "sunShine", "sunShine", new AttributesImpl());

        this.sendStartPrefixMapping();

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END startRecording");
View Full Code Here

        domBuilder.startDocument();
        domBuilder.startPrefixMapping(FormsConstants.INSTANCE_PREFIX, FormsConstants.INSTANCE_NS);
        // FIXME: why simply declaring the prefix isn't enough?
        AttributesImpl attr = new AttributesImpl();
        attr.addCDATAAttribute(NamespaceSupport.XMLNS, "fi:", "xmlns:fi", FormsConstants.INSTANCE_NS);
        domBuilder.startElement(FormsConstants.INSTANCE_NS, "fragment", FormsConstants.INSTANCE_PREFIX_COLON + "fragment", attr);
       
        widget.generateSaxFragment(domBuilder, locale);
       
        // End "fi:fragment" element and document
        domBuilder.endElement(FormsConstants.INSTANCE_NS, "fragment", FormsConstants.INSTANCE_PREFIX_COLON + "fragment");
View Full Code Here

            DOMBuilder builder = new DOMBuilder();
            builder.startDocument();
            builder.startPrefixMapping(NS_PREFIX, namespace);
            AttributesImpl attrs = new AttributesImpl();
            attrs.addAttribute(URI, NS_PREFIX, "xmlns:"+NS_PREFIX, "NMTOKEN", namespace);
            builder.startElement(namespace, name, D_PREFIX+name, attrs);
            builder.endElement(namespace, name, D_PREFIX+name);
            builder.endPrefixMapping(NS_PREFIX);
            Document doc = builder.getDocument();
            this.value = doc.getDocumentElement();
        } catch (SAXException se) {
View Full Code Here

            DOMBuilder builder = new DOMBuilder();
            builder.startDocument();
            builder.startPrefixMapping(NS_PREFIX, namespace);
            AttributesImpl attrs = new AttributesImpl();
            attrs.addAttribute(URI, NS_PREFIX, "xmlns:"+NS_PREFIX, "NMTOKEN", namespace);
            builder.startElement(namespace, name, D_PREFIX+name, attrs);
            builder.characters(value.toCharArray(), 0, value.length());
            builder.endElement(namespace, name, D_PREFIX+name);
            builder.endPrefixMapping(NS_PREFIX);
            builder.endDocument();
            Document doc = builder.getDocument();
View Full Code Here

     */
    public void setValue(NodeList values) {
        try {
            DOMBuilder builder = new DOMBuilder();
            builder.startDocument();
            builder.startElement(namespace, name, name, XMLUtils.EMPTY_ATTRIBUTES);
            DOMStreamer stream = new DOMStreamer(builder);
            for (int i = 0; i<values.getLength(); i++) {
                stream.stream(values.item(i));
            }
            builder.endElement(namespace, name, name);
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.