Package org.apache.cocoon.xml.dom

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


    }
   
    private NodeList toDOMNodeList(String elementName, StartInstruction si,
            MyJexlContext jexlContext, StartElement macroCall) throws SAXException{
        DOMBuilder builder = new DOMBuilder();
        builder.startDocument();
        builder.startElement(NS, elementName, elementName, EMPTY_ATTRS);
        execute(builder, jexlContext, jxpathContext, macroCall, si.next, si.endInstruction);
        builder.endElement(NS, elementName, elementName);
        builder.endDocument();
        Node node = builder.getDocument().getDocumentElement();
View Full Code Here


        try {
            // FIXME: There must be an easier way to create a DOM element
            DOMBuilder builder = new DOMBuilder();

            builder.startDocument();
            builder.startPrefixMapping(NS_PREFIX, namespace);
            AttributesImpl attrs = new AttributesImpl();

            attrs.addAttribute(XMLNS_NS, NS_PREFIX, "xmlns:"+NS_PREFIX,
                               "NMTOKEN", namespace);
View Full Code Here

        // this.value = value;

        try {
            DOMBuilder builder = new DOMBuilder();

            builder.startDocument();
            builder.startPrefixMapping(NS_PREFIX, namespace);
            AttributesImpl attrs = new AttributesImpl();

            attrs.addAttribute(XMLNS_NS, NS_PREFIX, "xmlns:"+NS_PREFIX,
                               "NMTOKEN", namespace);
View Full Code Here

     */
    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++)
View Full Code Here

                                                    ev.location,
                                                    exc);
                    }
                } else {
                    DOMBuilder builder = new DOMBuilder();
                    builder.startDocument();
                    builder.startElement(NS,
                                         "set",
                                         "set",
                                         EMPTY_ATTRS);
                    execute(builder, jexlContext, jxpathContext,
View Full Code Here

                            throw new Error("this shouldn't have happened");
                        }
                        attributeMap.put(attributeName, attributeValue);
                    }
                    DOMBuilder builder = new DOMBuilder();
                    builder.startDocument();
                    builder.startElement(startElement.namespaceURI,
                                         startElement.localName,
                                         startElement.raw,
                                         EMPTY_ATTRS);
                    executeRaw(builder,
View Full Code Here

        if (this.layoutDOM == null && this.profile != null) {
            try {
                Map portalLayouts = (Map)this.profile.get(PortalConstants.PROFILE_PORTAL_LAYOUTS);
                Map copletLayouts = (Map)this.profile.get(PortalConstants.PROFILE_COPLET_LAYOUTS);
                DOMBuilder builder = new DOMBuilder();
                builder.startDocument();
                PortalManager.streamLayoutProfile(builder, portalLayouts, copletLayouts, this.mediaType);
                builder.endDocument();
                this.layoutDOM = builder.getDocument();
            } catch (SAXException local) {
                throw new ProcessingException("Unable to get portal." + local, local);
View Full Code Here

                String contextID = null;
                if (this.copletID != null && this.copletNumber != null) {
                    contextID = "coplet_"+copletID+"_"+copletNumber;
                }
                DOMBuilder builder = new DOMBuilder();
                builder.startDocument();
                portal.streamConfiguration(builder,
                                            this.portalURI,
                                            this.profileID,
                                            this.mediaType,
                                            contextID);
View Full Code Here

        // this.value = value;

        try {
            DOMBuilder builder = new DOMBuilder();

            builder.startDocument();
            builder.startPrefixMapping(NS_PREFIX, namespace);
            AttributesImpl attrs = new AttributesImpl();

            attrs.addAttribute(XMLNS_NS, NS_PREFIX, "xmlns:"+NS_PREFIX,
                               "NMTOKEN", namespace);
View Full Code Here

     */
    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++)
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.