Package org.w3c.dom

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


                // <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

                    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

    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

                                         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

        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

        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

        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

            }
        }

        if (list != null && list.getLength() > 0) {
            Document doc = DOMUtil.createDocument();
            result = doc.createDocumentFragment();

            for(int i = 0; i < list.getLength(); i++) {

                // the found node is either an attribute or an element
                if (list.item(i).getNodeType() == Node.ATTRIBUTE_NODE) {
View Full Code Here

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("layout base profile loaded");
        }
        // now create the base profile containing the above profiles
        profileDoc = DOMUtil.createDocument();
        profile = profileDoc.createDocumentFragment();
        profileRoot = profileDoc.createElementNS(null, "profile");
        profile.appendChild(profileRoot);
        profileRoot.appendChild(profileDoc.importNode(DOMUtil.selectSingleNode(layoutFragment,
                                                                  "layout-profile"), true));
        profileRoot.appendChild(profileDoc.importNode(DOMUtil.selectSingleNode(copletsFragment,
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.