Examples of addCDATAAttribute()


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

                if (Modifier.isPublic(mods) && Modifier.isStatic(mods)
                        && Modifier.isFinal(mods) && fields[i].get(null).getClass().equals(clazz)) {
                    String stringValue = clazz.getName() + "." + fields[i].getName();
                    // Output this item
                    AttributesImpl itemAttrs = new AttributesImpl();
                    itemAttrs.addCDATAAttribute("value", stringValue);
                    contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
                    contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                    // TODO: make i18n element optional
                    contentHandler.startElement(I18N_NS, TEXT_EL, I18N_PREFIX_COLON + TEXT_EL, XMLUtils.EMPTY_ATTRIBUTES);
                    contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
View Full Code Here

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

        // Start wi:selection list
        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);

        // Start wi:item
        AttributesImpl itemAttrs = new AttributesImpl();
        itemAttrs.addCDATAAttribute("value", "");
        contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);

        // Start wi:label
        contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
        if (this.text != null) {
View Full Code Here

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

    public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
        String pattern = getDateFormat(locale).toPattern();

        if (pattern != null) {
            AttributesImpl attrs = new AttributesImpl();
            attrs.addCDATAAttribute("pattern", pattern);
            attrs.addCDATAAttribute("variant", this.variant);
            contentHandler.startElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL, attrs);
            contentHandler.endElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL);
        }
    }
View Full Code Here

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

        String pattern = getDateFormat(locale).toPattern();

        if (pattern != null) {
            AttributesImpl attrs = new AttributesImpl();
            attrs.addCDATAAttribute("pattern", pattern);
            attrs.addCDATAAttribute("variant", this.variant);
            contentHandler.startElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL, attrs);
            contentHandler.endElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL);
        }
    }
}
View Full Code Here

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

                }
            }

            // Output this item
            AttributesImpl itemAttrs = new AttributesImpl();
            itemAttrs.addCDATAAttribute("value", stringValue);
            contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
            if (label != null) {
                contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                if (label instanceof XMLizable) {
                    ((XMLizable)label).toSAX(contentHandler);
View Full Code Here

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

        // build attributes
        AttributesImpl attrs = new AttributesImpl();
        Iterator iter = attributes.entrySet().iterator();
        while(iter.hasNext()) {
            Map.Entry entry = (Map.Entry)iter.next();
            attrs.addCDATAAttribute((String)entry.getKey(), (String)entry.getValue());
        }

        this.cocoonConsumer.startPrefixMapping(Constants.INSTANCE_PREFIX, Constants.INSTANCE_NS);
        this.cocoonConsumer.startElement(Constants.INSTANCE_NS,
                                         "form-template",
View Full Code Here

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

    protected AttributesImpl getXMLElementAttributes() {
        AttributesImpl attrs = new AttributesImpl();
        // top-level widget-containers like forms will have their id set to ""
        // for those the @id should not be included.
        if (getId().length() != 0) {
          attrs.addCDATAAttribute("id", getRequestParameterName());
        }

        // Add the "state" attribute if different from active (the default state)
        WidgetState state = getCombinedState();
        if (state != WidgetState.ACTIVE) {
View Full Code Here

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

        }

        // Add the "state" attribute if different from active (the default state)
        WidgetState state = getCombinedState();
        if (state != WidgetState.ACTIVE) {
            attrs.addCDATAAttribute("state", getCombinedState().getName());
        }
        return attrs;
    }

    /**
 
View Full Code Here

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

     * @see #getFormMethod()
     */
    public Attributes getFormAttributes() {
        AttributesImpl formAtts = new AttributesImpl();
        if (getFormAction() != null) {
            formAtts.addCDATAAttribute("action", getFormAction());
        }
        if (getFormMethod() != null){
            formAtts.addCDATAAttribute("method", getFormMethod());
        }
        return formAtts;
View Full Code Here

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

        AttributesImpl formAtts = new AttributesImpl();
        if (getFormAction() != null) {
            formAtts.addCDATAAttribute("action", getFormAction());
        }
        if (getFormMethod() != null){
            formAtts.addCDATAAttribute("method", getFormMethod());
        }
        return formAtts;
    }
   
    public static final class FormsVariables implements Variables {
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.