Package org.xml.sax.helpers

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


                        attributes = (AttributesImpl) attr;
                    } else {
                        attributes = new AttributesImpl(attr);
                    }
                    // remove attributes not meant for client
                    attributes.removeAttribute(attributes.getIndex("name"));
                    if (when != null)    attributes.removeAttribute(attributes.getIndex("when"));
                    if (when_ge != null) attributes.removeAttribute(attributes.getIndex("when-ge"));
                    super.startElement(uri, name, raw, (Attributes)attributes);
                } else {
                    this.ignoreCount++;
View Full Code Here


                    } else {
                        attributes = new AttributesImpl(attr);
                    }
                    // remove attributes not meant for client
                    attributes.removeAttribute(attributes.getIndex("name"));
                    if (when != null)    attributes.removeAttribute(attributes.getIndex("when"));
                    if (when_ge != null) attributes.removeAttribute(attributes.getIndex("when-ge"));
                    super.startElement(uri, name, raw, (Attributes)attributes);
                } else {
                    this.ignoreCount++;
                    this.stack.push(name);
View Full Code Here

                        attributes = new AttributesImpl(attr);
                    }
                    // remove attributes not meant for client
                    attributes.removeAttribute(attributes.getIndex("name"));
                    if (when != null)    attributes.removeAttribute(attributes.getIndex("when"));
                    if (when_ge != null) attributes.removeAttribute(attributes.getIndex("when-ge"));
                    super.startElement(uri, name, raw, (Attributes)attributes);
                } else {
                    this.ignoreCount++;
                    this.stack.push(name);
                    this.ignoreThis = true;
View Full Code Here

                else
                    prefix = "";

                startPrefixMapping( prefix, attrs.getValue( i ) );
                //Remove it
                attrsOnly.removeAttribute( i );
            }
        }
        return attrsOnly;
    }
View Full Code Here

                    if (!containsEvent(event)) {
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("Removing href attribute");
                        }
                        attributes.removeAttribute(hrefIndex);
                    } else {
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("Adding event to href attribute");
                        }
                        String href = attributes.getValue("href");
View Full Code Here

        int typeIndex=-1;
        if((typeIndex = attrs.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
                                "type")) != -1){

            //Found a xsi:type which should not be there for attachments.
            attrs.removeAttribute(typeIndex);
        }

        attrs.addAttribute("", Constants.ATTR_HREF, "href",
                               "CDATA", attachmentPart.getContentIdRef() );
View Full Code Here

        if ( i18n_attr_index != -1 ) {

            StringTokenizer st =
                    new StringTokenizer( temp_attr.getValue( i18n_attr_index ) );
            // remove the i18n:attr attribute - we don't need it
            temp_attr.removeAttribute( i18n_attr_index );
            while ( st.hasMoreElements() ) {
                // translate all listed attributes
                String attr_name = st.nextToken();
                int attr_index = temp_attr.getIndex( attr_name );
View Full Code Here

        if (i18n_attr_index != -1) {
            StringTokenizer st =
                new StringTokenizer(temp_attr.getValue(i18n_attr_index));

            // remove the i18n:attr attribute - we don't need it
            temp_attr.removeAttribute(i18n_attr_index);

            // iterate through listed attributes and translate them
            while (st.hasMoreElements()) {
                String attr_name = st.nextToken();
                int attr_index = temp_attr.getIndex(attr_name);
View Full Code Here

        int typeIndex=-1;
        if((typeIndex = attrs.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
                                "type")) != -1){

            //Found a xsi:type which should not be there for attachments.
            attrs.removeAttribute(typeIndex);
        }

        attrs.addAttribute("", Constants.ATTR_HREF, "href",
                               "CDATA", attachmentPart.getContentIdRef() );
View Full Code Here

        if (idx > -1) {
            // Got it, so replace it's value.
            if (value != null) {
                attributes.setValue(idx, value);
            } else {
                attributes.removeAttribute(idx);
            }
            return;
        }

        addAttribute(namespace, localName, value);
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.