Package org.apache.xindice.xml.dom

Examples of org.apache.xindice.xml.dom.DocumentImpl.createElementNS()


      // This impl works but it would be nice if we just got the result set from
      // the server in this format instead of having to build it. Right now it's
      // pretty innefficient
      Document doc = new DocumentImpl();

      Element set = doc.createElementNS(RESOURCE_SET_NS, "xapi:resourceSet");
      set.setAttributeNS(RESOURCE_SET_NS, "xapi:collectionURI",
         "xmldb:xindice://" + ((XindiceCollection) collection).getCanonicalName());
      set.setAttribute("xmlns:xapi", RESOURCE_SET_NS);
      doc.appendChild(set);
View Full Code Here


      doc.appendChild(set);

      int i = 0;
      while ( i < resources.size() ) {
         XMLResource res = (XMLResource) resources.get(i);
         Element resource = doc.createElementNS(RESOURCE_SET_NS,
            "xapi:resource");
         resource.setAttributeNS(RESOURCE_SET_NS, "xapi:documentID",
            res.getDocumentId());

         resource.appendChild(doc.importNode(
View Full Code Here

            else {
               xu.execute(context);
            }

            DocumentImpl doc = new DocumentImpl();
            Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:"+NodeSource.SOURCE_MODIFIED);
            elem.setAttribute(NodeImpl.XMLNS_PREFIX+":src", NodeSource.SOURCE_NS);
            doc.appendChild(elem);
            Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
            elem.appendChild(count);
           
View Full Code Here

        // This impl works but it would be nice if we just got the result set from
        // the server in this format instead of having to build it. Right now it's
        // pretty innefficient
        Document doc = new DocumentImpl();

        Element set = doc.createElementNS(RESOURCE_SET_NS, "xapi:resourceSet");
        set.setAttributeNS(RESOURCE_SET_NS, "xapi:collectionURI",
                           "xmldb:xindice://" + ((XindiceCollection) collection).getCanonicalName());
        set.setAttribute("xmlns:xapi", RESOURCE_SET_NS);
        doc.appendChild(set);
View Full Code Here

        doc.appendChild(set);

        int i = 0;
        while (i < resources.size()) {
            XMLResource res = (XMLResource) resources.get(i);
            Element resource = doc.createElementNS(RESOURCE_SET_NS,
                                                   "xapi:resource");
            resource.setAttributeNS(RESOURCE_SET_NS, "xapi:documentID",
                                    res.getDocumentId());

            resource.appendChild(doc.importNode(
View Full Code Here

                } else {
                    xu.execute(context);
                }

                DocumentImpl doc = new DocumentImpl();
                Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:" + NodeSource.SOURCE_MODIFIED);
                elem.setAttribute(NodeImpl.XMLNS_PREFIX + ":src", NodeSource.SOURCE_NS);
                doc.appendChild(elem);
                Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
                elem.appendChild(count);
View Full Code Here

        while (nodeSet != null && nodeSet.hasMoreNodes()) {
            final Object element = nodeSet.getNextNode();
            if (element instanceof Attr) {
                Attr n = (Attr) element;

                Element holder = doc.createElementNS(XindiceCollection.QUERY_NS, "xq:result");
                holder.setAttribute(NodeImpl.XMLNS_PREFIX + ":xq", XindiceCollection.QUERY_NS);
                holder.setAttributeNode((Attr) doc.importNode(n, true));

                if (expandSource && n instanceof DBNode) {
                    ((DBNode) holder).setSource(((DBNode) n).getSource());
View Full Code Here

                root.appendChild(holder);
            } else if (element instanceof Text || element instanceof Comment) {
                Node n = (Node) element;

                Element holder = doc.createElementNS(XindiceCollection.QUERY_NS, "xq:result");
                holder.setAttribute(NodeImpl.XMLNS_PREFIX + ":xq", XindiceCollection.QUERY_NS);
                holder.appendChild(doc.importNode(n, true));

                if (expandSource && n instanceof DBNode) {
                    ((DBNode) holder).setSource(((DBNode) n).getSource());
View Full Code Here

        // This impl works but it would be nice if we just got the result set from
        // the server in this format instead of having to build it. Right now it's
        // pretty innefficient
        Document doc = new DocumentImpl();

        Element set = doc.createElementNS(RESOURCE_SET_NS, "xapi:resourceSet");
        set.setAttributeNS(RESOURCE_SET_NS, "xapi:collectionURI",
                           "xmldb:xindice://" + ((XindiceCollection) collection).getCanonicalName());
        set.setAttribute("xmlns:xapi", RESOURCE_SET_NS);
        doc.appendChild(set);
View Full Code Here

        doc.appendChild(set);

        int i = 0;
        while (i < resources.size()) {
            XMLResource res = (XMLResource) resources.get(i);
            Element resource = doc.createElementNS(RESOURCE_SET_NS,
                                                   "xapi:resource");
            resource.setAttributeNS(RESOURCE_SET_NS, "xapi:documentID",
                                    res.getDocumentId());

            resource.appendChild(doc.importNode(
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.