Examples of DOMBuilder


Examples of org.apache.cocoon.xml.dom.DOMBuilder

     *
     * @param values
     */
    public void setValue(NodeList values) {
        try {
            DOMBuilder builder = new DOMBuilder();

            builder.startDocument();
            builder.startElement(namespace, name, name, new AttributesImpl());

            DOMStreamer stream = new DOMStreamer(builder);

            for (int i = 0; i<values.getLength(); i++)
                stream.stream(values.item(i));

            builder.endElement(namespace, name, name);
            builder.endDocument();

            Document doc = builder.getDocument();

            this.value = doc.getDocumentElement();
        } catch (SAXException se) {
            // do nothing
        }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

     * Appends children representing the object's state to the given node by using
     * the results of <code>toSAX()</code>.
     */
    public void toDOM(Node node) throws Exception
    {
        DOMBuilder builder = new DOMBuilder(node);
        this.toSAX(builder);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

    throws SAXException {
        //only build the DOM tree if session is available
        if (name.equalsIgnoreCase(rootElement) && sessionAvailable)  {
          getLogger().debug("WriteSessionTransformer: start building DOM tree");
          buildDom = true;
          builder = new DOMBuilder(parser);
          builder.startDocument();
          launchStoredMappings();
          builder.startElement(uri,name,raw,attributes);
        } else if (buildDom)  {
          builder.startElement(uri,name,raw,attributes);
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

    protected DOMBuilder builder;


    public AbstractDOMTransformer() {
        super();
        this.builder = new DOMBuilder(this);
    }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

            extractLevel++;
            fragmentID++;
            getLogger().debug("FragmentExtractorTransformer extractLevel now " + extractLevel + ".");

            // Start the DOM document
            this.currentBuilder = new DOMBuilder();
            this.currentBuilder.startDocument();
            Iterator itt = prefixMap.entrySet().iterator();
            while (itt.hasNext()) {
                Map.Entry entry = (Map.Entry)itt.next();
                this.currentBuilder.startPrefixMapping(
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

    public void startRecording()
    throws SAXException {
        if (this.getLogger().isDebugEnabled() == true) {
            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

Examples of org.apache.cocoon.xml.dom.DOMBuilder

            this.getLogger().debug("BEGIN endRecording");
        }

        this.sendEndPrefixMapping();

        DOMBuilder builder = (DOMBuilder)this.removeRecorder();
        builder.endElement("", "sunShine", "sunShine");
        builder.endDocument();

        // Create Document Fragment
        final Document doc = builder.getDocument();
        final DocumentFragment recordedDocFrag = doc.createDocumentFragment();
        final Node root = doc.getDocumentElement();
        root.normalize();
        Node child;
        boolean appendedNode = false;
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

    throws ProcessingException {
        if (this.layoutDOM == null && this.profile != null) {
            try {
                Map portalLayouts = (Map)this.profile.get(Constants.PROFILE_PORTAL_LAYOUTS);
                Map sunletLayouts = (Map)this.profile.get(Constants.PROFILE_SUNLET_LAYOUTS);
                DOMBuilder builder = new DOMBuilder();
                builder.startDocument();
                SunSpot.streamLayoutProfile(builder, portalLayouts, sunletLayouts, this.mediaType);
                builder.endDocument();
                this.layoutDOM = builder.getDocument();
            } catch (SAXException local) {
                throw new ProcessingException("Unable to get sunSpot." + local, local);
            }
        }
    }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

            try {
                String contextID = null;
                if (this.sunletID != null && this.sunletNumber != null) {
                    contextID = "sunlet_"+sunletID+"_"+sunletNumber;
                }
                DOMBuilder builder = new DOMBuilder();
                builder.startDocument();
                sunSpot.streamConfiguration(builder,
                                            this.portalURI,
                                            this.profileID,
                                            this.mediaType,
                                            contextID);
                builder.endDocument();
                this.configurationDOM = builder.getDocument();
            } catch (SAXException local) {
                throw new ProcessingException("Unable to get sunSpot." + local, local);
            }
        }
    }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMBuilder

            extractLevel++;
            imageID++;
            getLogger().debug("FragmentExtractorTransformer extractLevel now " + extractLevel + ".");

            // Start the DOM document
            this.currentBuilder = new DOMBuilder(documentFactory);
            this.currentBuilder.startDocument();
            Iterator itt = prefixMap.entrySet().iterator();
            while ( itt.hasNext() ) {
                Map.Entry entry = (Map.Entry)itt.next();
                this.currentBuilder.startPrefixMapping(
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.