Package org.apache.cocoon.xml

Examples of org.apache.cocoon.xml.AttributesImpl.removeAttribute()


        // remove ATTRIBUTE_ATTR, "coplet" and ELEMENT_ATTR from attributes
        AttributesImpl newAttributes = this.getMutableAttributes(attributes);
        newAttributes.removeAttribute(ELEMENT_ATTR);
        newAttributes.removeAttribute(ATTRIBUTE_ATTR);
        newAttributes.removeAttribute("coplet");

        int index = newAttributes.getIndex(attributeName);
        String link = newAttributes.getValue(index);

        boolean formSpecialTreatment = false;
View Full Code Here


        while(iter.hasNext()) {
            Map.Entry entry = (Map.Entry)iter.next();
            final String attrName = (String)entry.getKey();
            // check if the attribute has already been defined
            if ( attrs.getValue(attrName) != null ) {
                attrs.removeAttribute(attrName);
            }
            attrs.addCDATAAttribute(attrName, (String)entry.getValue());
        }
       
        this.ajaxTemplate = "true".equals(attributes.get("ajax"));
View Full Code Here

        AttributesImpl cleanedAttribs = new AttributesImpl(attribs);

        if (valueAttr != null) {
            attrInterpolation = Boolean.valueOf(valueAttr).booleanValue();
            cleanedAttribs.removeAttribute(cleanedAttribs.getIndex(markupURI, XSPMarkupLanguage.ATTR_INTERPOLATION));
        }

        if (valueText != null) {
            textInterpolation = Boolean.valueOf(valueText).booleanValue();
            cleanedAttribs.removeAttribute(cleanedAttribs.getIndex(markupURI, XSPMarkupLanguage.TEXT_INTERPOLATION));
View Full Code Here

            cleanedAttribs.removeAttribute(cleanedAttribs.getIndex(markupURI, XSPMarkupLanguage.ATTR_INTERPOLATION));
        }

        if (valueText != null) {
            textInterpolation = Boolean.valueOf(valueText).booleanValue();
            cleanedAttribs.removeAttribute(cleanedAttribs.getIndex(markupURI, XSPMarkupLanguage.TEXT_INTERPOLATION));
        }

        interpolationStack.addLast(new InterpolationSettings(attrInterpolation,
                                                             textInterpolation));
View Full Code Here

    }

    protected void createAnchorEvent(Attributes attributes)
    throws SAXException {
        AttributesImpl newAttributes = new AttributesImpl(attributes);
        newAttributes.removeAttribute("href");
        newAttributes.removeAttribute("external");
        String link = attributes.getValue("href");

        CopletInstanceData cid = this.getCopletInstanceData();
        link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), link);
View Full Code Here

    protected void createAnchorEvent(Attributes attributes)
    throws SAXException {
        AttributesImpl newAttributes = new AttributesImpl(attributes);
        newAttributes.removeAttribute("href");
        newAttributes.removeAttribute("external");
        String link = attributes.getValue("href");

        CopletInstanceData cid = this.getCopletInstanceData();
        link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), link);
View Full Code Here

    }

    protected void createFormEvent(Attributes attributes)
    throws SAXException {
        AttributesImpl newAttributes = new AttributesImpl(attributes);
        newAttributes.removeAttribute("action");
        String link = attributes.getValue("action");

        CopletInstanceData cid = this.getCopletInstanceData();
        link = this.getLink((String)cid.getTemporaryAttribute(this.attributeName), link);
View Full Code Here

                int pos = action.indexOf('?');
                if ( pos != -1 ) {
                    AttributesImpl ai = new AttributesImpl(a);
                    a = ai;
                    final String queryString = action.substring(pos+1);
                    ai.removeAttribute("action");
                    ai.addCDATAAttribute("action", action.substring(0, pos));
                    super.startElement(uri, loc, raw, a);
                    RequestParameters rp = new RequestParameters(queryString);

                    final Enumeration e = rp.getParameterNames();
View Full Code Here

            // ====> Retrieve the form
            String formLocation = attrs.getValue(LOCATION);
            if (formLocation != null) {
                // Remove the location attribute
                newAttrs.removeAttribute(newAttrs.getIndex(LOCATION));
            }
            contextWidget = pipeContext.findForm(formLocation);

            // ====> Check if form visible (and skip it if it's not)
            if (!isVisible(contextWidget)) {
View Full Code Here

        AttributesImpl cleanedAttribs = new AttributesImpl(attribs);

        if (valueAttr != null) {
            attrInterpolation = Boolean.valueOf(valueAttr).booleanValue();
            cleanedAttribs.removeAttribute(cleanedAttribs.getIndex(markupURI, XSPMarkupLanguage.ATTR_INTERPOLATION));
        }

        if (valueText != null) {
            textInterpolation = Boolean.valueOf(valueText).booleanValue();
            cleanedAttribs.removeAttribute(cleanedAttribs.getIndex(markupURI, XSPMarkupLanguage.TEXT_INTERPOLATION));
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.