Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributesImpl.clear()


                            super.startElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link", atts);
                            super.endElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link");
                        }
                    }
                    if ((rules.rangeLink > 0) && (page + rules.rangeLink <= totalPages)) {
                        atts.clear();
                        atts.addAttribute(null,"type","type","CDATA","next");
                        atts.addAttribute(null,"uri","uri","CDATA",encodeURI(requestURI,page,page + rules.rangeLink));
                        atts.addAttribute(null,"page","page","CDATA",String.valueOf(page + rules.rangeLink));
                        super.startElement(PAGINATE_URI, "range-link", PAGINATE_PREFIX_TOKEN + "range-link", atts);
                        super.endElement(PAGINATE_URI, "range-link", PAGINATE_PREFIX_TOKEN + "range-link");
View Full Code Here


                    atts.addAttribute(null,"current-uri","current-uri","CDATA",requestURI);
                    atts.addAttribute(null,"clean-uri","clean-uri","CDATA",cleanURI(requestURI,item));
                    atts.addAttribute(null,"page","page","CDATA",String.valueOf(pagesheet.getPageForItem(item,itemGroup)));
                    super.startElement(PAGINATE_URI, "item", PAGINATE_PREFIX_TOKEN + "item", atts);
                    if (item > 1) {
                        atts.clear();
                        atts.addAttribute(null,"type","type","CDATA","prev");
                        atts.addAttribute(null,"uri","uri","CDATA",encodeURI(requestURI,item,item-1));
                        super.startElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link", atts);
                        super.endElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link");
                    }
View Full Code Here

                        atts.addAttribute(null,"uri","uri","CDATA",encodeURI(requestURI,item,item-1));
                        super.startElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link", atts);
                        super.endElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link");
                    }
                    if (item <= totalItems) {
                        atts.clear();
                        atts.addAttribute(null,"type","type","CDATA","next");
                        atts.addAttribute(null,"uri","uri","CDATA",encodeURI(requestURI,item,item+1));
                        super.startElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link", atts);
                        super.endElement(PAGINATE_URI, "link", PAGINATE_PREFIX_TOKEN + "link");
                    }
View Full Code Here

                // for a simpler XSL-Stylesheet: The columns must be inserted in the
                // correct order!!!
                if (value != null && new Integer(value).intValue() > 0) {
                    attr.addAttribute("", "number", "number", "CDATA", value);
                    this.sendStartElementEvent(consumer, "columns", attr);
                    attr.clear();

                    int columns = new Integer(value).intValue();
                    if (columns > PortalConstants.MAX_COLUMNS) {
                        throw new ProcessingException("portal: Maximum number of columns supported is: "+PortalConstants.MAX_COLUMNS);
                    }
View Full Code Here

                    for(int colindex = 1; colindex <= columns; colindex++) {
                        attr.addAttribute("", "position", "position", "CDATA", "" + colindex);
                        attr.addAttribute("", "width", "width", "CDATA", width[colindex-1]);
                        this.sendStartElementEvent(consumer, "column", attr);
                        attr.clear();

                        this.processCopletList(copletContents[colindex+1], consumer, copletNotAvailableMessage, defaultCopletTimeout);

                        this.sendEndElementEvent(consumer, "column");
                    }
View Full Code Here

                    this.sendEndElementEvent(consumer, "columns");
                } else {
                    attr.addAttribute("", "number", "number", "CDATA", "0");
                    this.sendStartElementEvent(consumer, "columns", attr);
                    this.sendEndElementEvent(consumer, "columns");
                    attr.clear();
                }

                // test for footer
                if (copletContents[1].size() > 0) {
                    this.sendStartElementEvent(consumer, "footer");
View Full Code Here

            AttributesImpl attr = new AttributesImpl();
            attr.addAttribute("", "id", "id", "CDATA", copletID);
            attr.addAttribute("", "number", "number", "CDATA", element.getAttributeNS(null, "number"));
            attr.addAttribute("", "position", "position", "CDATA", element.getAttributeNS(null, "position"));
            consumer.startElement("", "coplet", "coplet", attr);
            attr.clear();

            // now include all children of the coplet element except status
            NodeList children = copletConf.getChildNodes();
            if (children != null && children.getLength() > 0) {
                int l = children.getLength();
View Full Code Here

                handler.startElement(URI, COLLECTIONS, QCOLLECTIONS, attributes);

                // Print child collections
                String[] collections = collection.listChildCollections();
                for (int i = 0; i < collections.length; i++) {
                    attributes.clear();
                    attributes.addAttribute("", NAME_ATTR, NAME_ATTR, CDATA, collections[i]);
                    handler.startElement(URI, COLLECTION,
                            QCOLLECTION, attributes);
                    handler.endElement(URI, COLLECTION, COLLECTION);
                }
View Full Code Here

                }

                // Print child resources
                String[] resources = collection.listResources();
                for (int i = 0; i < resources.length; i++) {
                    attributes.clear();
                    attributes.addAttribute("", NAME_ATTR, NAME_ATTR, CDATA, resources[i]);
                    handler.startElement(URI, RESOURCE,
                            QRESOURCE, attributes);
                    handler.endElement(URI, RESOURCE, RESOURCE);
                }
View Full Code Here

                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
                if (id != null) {
                    attributes.addAttribute("", RESULT_ID_ATTR, RESULT_ID_ATTR,
                        CDATA, id);
                }
                if (documentId != 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.