Examples of createDocumentFragment()


Examples of org.w3c.dom.Document.createDocumentFragment()

        }
        Source source = null;
        try {
            source = SourceUtil.getSource(this.loadResource, null, parameters, resolver);
            Document doc = SourceUtil.toDOM(source);
            DocumentFragment df = doc.createDocumentFragment();
            df.appendChild(doc.getDocumentElement());
            this.setXML(path, df);
        } catch (SourceException se) {
            throw SourceUtil.handle(se);
        } finally {
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

            // now create the following xml:
            // <failed/>
            // if data is available data is included, otherwise:
            // <data>No information</data>
            // If exception message contains info, it is included into failed
            DocumentFragment authenticationFragment = doc.createDocumentFragment();

            Element element = doc.createElementNS(null, "failed");
            authenticationFragment.appendChild(element);

            if (exceptionMsg != null) {
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

                                                                                      null,
                                                                                      parameters,
                                                                                      this.resolver);
                   
                    Document doc = org.apache.cocoon.components.source.SourceUtil.toDOM(source);
                    authenticationFragment = doc.createDocumentFragment();
                    authenticationFragment.appendChild(doc.getDocumentElement());
                } catch (SAXException se) {
                    throw new ProcessingException(se);
                } catch (SourceException se) {
                    throw org.apache.cocoon.components.source.SourceUtil.handle(se);
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

                // <failed/>
                // if data is available data is included, otherwise:
                // <data>No information</data>
                // If exception message contains info, it is included into failed
                Document       doc = DOMUtil.createDocument();
                authenticationFragment = doc.createDocumentFragment();

                Element      element = doc.createElementNS(null, "failed");
                authenticationFragment.appendChild(element);

                if (exceptionMsg != null) {
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

                    source = org.apache.cocoon.components.source.SourceUtil.getSource(loadResourceName,
                                                                                      null,
                                                                                      parameters,
                                                                                      this.resolver);
                    Document doc = org.apache.cocoon.components.source.SourceUtil.toDOM(source);
                    fragment = doc.createDocumentFragment();
                    fragment.appendChild(doc.getDocumentElement());
                } catch (SourceException se) {
                    throw org.apache.cocoon.components.source.SourceUtil.handle(se);
                } catch (IOException se) {
                    throw new ProcessingException(se);
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

    boolean debug = gadgetContext.getDebug();
    Document doc = mc.getDocument();

    // Serialize outside of MutableContent, to prevent a re-parse.
    String docContent = HtmlSerialization.serialize(doc);
    Node root = doc.createDocumentFragment();
    root.appendChild(doc.getDocumentElement());

    if (debug) {
      gadget.addFeature("caja-debug");
    }
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

                                         attributes.getValue(i));
                }
            }
            builder = new NodeBuilder(doc, element);
        } else {
            builder = new NodeBuilder(doc, doc.createDocumentFragment());
        }
        // the NodeBuilder constructor has already saved the original
        // value of the digester's custom content handler (expected to
        // be null, but we save it just in case). So now we just
        // need to tell the digester to forward events to the builder.
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

        try {
            source = SourceUtil.getSource(location, typeParameters,
                                          parameters, resolver);
            Document doc = SourceUtil.toDOM(source);
            DocumentFragment fragment = doc.createDocumentFragment();

            fragment.appendChild(doc.getDocumentElement());

            return fragment;
        } catch (SourceException se) {
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

        builder.endElement("", "cocoon", "cocoon");
        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;
        while (root.hasChildNodes() == true) {
View Full Code Here

Examples of org.w3c.dom.Document.createDocumentFragment()

        if (path.startsWith("/") == true) path = path.substring(1);
        NodeList list = null;

        if (path == null || path.equals("") == true) {
            Document doc = DOMUtil.createDocument();
            result = doc.createDocumentFragment();
            this.getLayoutDOM();
            if (this.layoutDOM != null) {
                result.appendChild(doc.importNode(this.layoutDOM.getDocumentElement(), true));
            }
            if (this.configurationDOM != null) {
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.