Package org.xml.sax.helpers

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


                        // Use the output attributes as the input to ensure that
                        // indeces match.
                        attributes = output;
                    }
                    output.removeAttribute(index);
                }

                // Resolve the value to an ExpandedName, update the value for
                // the current element and store it away just in case it is
                // needed for descendant elements.
View Full Code Here


                    // evaluate the experssion
                    Value result = expression.evaluate(expressionContext);
                    if (result.getSequence().getLength() == 0) {
                        // if the sequence is empty then we must remove the
                        // attriubute.
                        output.removeAttribute(i);
                    } else {
                        // update the current attribute with the string
                        // representation of the evaluated expression.
                        output.setValue(i, result.stringValue().asJavaString());
                    }
View Full Code Here

            if (baseURI != null) {
                AttributesImpl cloneAttrs = new AttributesImpl(atts);
                int index = cloneAttrs.
                        getIndex(NamespaceSupport.XMLNS, BASE_ATTRIBUTE);
                cloneAttrs.removeAttribute(index);
                attributes = cloneAttrs;
            }
        } catch (MalformedURLException e) {
            fatalError(new XMLPipelineException(
                    "base uri attribute is malformed",
View Full Code Here

                currentBase);

        AttributesImpl cloneAttrs = new AttributesImpl(atts);
                int index = cloneAttrs.
                        getIndex(NamespaceSupport.XMLNS, "base");
                cloneAttrs.removeAttribute(index);

        // ensure that the event is forwarded to the next process
        next.assertStartElementInvoked(namespaceURI, localName, qName, cloneAttrs);
    }
View Full Code Here

                else
                    prefix = "";

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

       
        AttributesImpl newAttributes = new AttributesImpl(atts);
        for (int att = 0; att < newAttributes.getLength(); att++) {
            String normAttrName = mapper.mapSafeAttribute(name, newAttributes.getLocalName(att));
            if (normAttrName == null) {
                newAttributes.removeAttribute(att);
                att--;
            } else {
                // We have a remapped attribute name, so set it as it might have changed.
                newAttributes.setLocalName(att, normAttrName);
               
View Full Code Here

            StringTokenizer st = new StringTokenizer(attr.getValue(attrIndex));

            // Make a copy which we are going to modify
            tempAttr = new AttributesImpl(attr);
            // Remove the i18n:attr attribute - we don't need it anymore
            tempAttr.removeAttribute(attrIndex);

            // Iterate through listed attributes and translate them
            while (st.hasMoreElements()) {
                final String name = st.nextToken();
View Full Code Here

            StringTokenizer st = new StringTokenizer(attr.getValue(attrIndex));

            if (tempAttr == null) {
                tempAttr = new AttributesImpl(attr);
            }
            tempAttr.removeAttribute(attrIndex);

            // Iterate through listed attributes and evaluate them
            while (st.hasMoreElements()) {
                final String name = st.nextToken();
View Full Code Here

                // first look for the form using the location attribute, if any
                String formJXPath = attributes.getValue(LOCATION);
                if (formJXPath != null) {
                    // remove the location attribute
                    AttributesImpl attrsCopy = new AttributesImpl(attributes);
                    attrsCopy.removeAttribute(attributes.getIndex(LOCATION));
                    attributes = attrsCopy;
                }
                contextWidget = pipeContext.findForm(formJXPath);

                // ====> Determine the Locale
View Full Code Here

        //always iterate backwards when removing elements!
        for (int i = newAttributes.getLength() - 1; i >= 0; i--) {
            if (ELEMENT_ATTR.equals(attributes.getLocalName(i))
                || ATTRIBUTE_ATTR.equals(attributes.getLocalName(i))) {
                newAttributes.removeAttribute(i);
            }
        }

        int index = newAttributes.getIndex(attributeName);
        String link = newAttributes.getValue(index);
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.