Package org.apache.cocoon.xml

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


                }
                // add parameters
                final Iterator iter = tab.getParameters().entrySet().iterator();
                while ( iter.hasNext() ) {
                    final Map.Entry entry = (Map.Entry) iter.next();
                    attributes.addCDATAAttribute((String)entry.getKey(), (String)entry.getValue());
                }
               
                XMLUtils.startElement(handler, "named-item", attributes);
                if (j == selected) {
                    this.processLayout(tab.getLayout(), service, handler);
View Full Code Here


            AttributesImpl attributes = new AttributesImpl();

      Map.Entry entry;
      for (Iterator iter = parameters.entrySet().iterator(); iter.hasNext();) {
        entry = (Map.Entry) iter.next();
        attributes.addCDATAAttribute((String)entry.getKey(), (String)entry.getValue());
      }
            XMLUtils.startElement(handler, ITEM_STRING, attributes);
        }
        processLayout(layout, service, handler);
        XMLUtils.endElement(handler, ITEM_STRING);
View Full Code Here

    private static final String VALUE_EL = "value";
    private static final String VALIDATION_MSG_EL = "validation-message";

    public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
        AttributesImpl aggregatedFieldAttrs = new AttributesImpl();
        aggregatedFieldAttrs.addCDATAAttribute("id", getFullyQualifiedId());
        aggregatedFieldAttrs.addCDATAAttribute("required", String.valueOf(getAggregateFieldDefinition().isRequired()));
        contentHandler.startElement(Constants.WI_NS, AGGREGATEFIELD_EL, Constants.WI_PREFIX_COLON + AGGREGATEFIELD_EL, aggregatedFieldAttrs);

        if (enteredValue != null || value != null) {
            contentHandler.startElement(Constants.WI_NS, VALUE_EL, Constants.WI_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
View Full Code Here

    private static final String VALIDATION_MSG_EL = "validation-message";

    public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
        AttributesImpl aggregatedFieldAttrs = new AttributesImpl();
        aggregatedFieldAttrs.addCDATAAttribute("id", getFullyQualifiedId());
        aggregatedFieldAttrs.addCDATAAttribute("required", String.valueOf(getAggregateFieldDefinition().isRequired()));
        contentHandler.startElement(Constants.WI_NS, AGGREGATEFIELD_EL, Constants.WI_PREFIX_COLON + AGGREGATEFIELD_EL, aggregatedFieldAttrs);

        if (enteredValue != null || value != null) {
            contentHandler.startElement(Constants.WI_NS, VALUE_EL, Constants.WI_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
            String stringValue;
View Full Code Here

        if (parameter.size() > 0) {
            AttributesImpl attributes = new AttributesImpl();
            Map.Entry entry;
            for (Iterator iter = parameter.entrySet().iterator(); iter.hasNext();) {
                entry = (Map.Entry) iter.next();
                attributes.addCDATAAttribute((String)entry.getKey(), (String)entry.getValue());
            }
            XMLUtils.startElement(contenthandler, config.tagName, attributes);
        } else {
            XMLUtils.startElement(contenthandler, config.tagName);
        }
View Full Code Here

     */
    protected void createCInclude(String source, ContentHandler handler)
    throws SAXException {
        handler.startPrefixMapping(PREFIX, NAMESPACE);
        AttributesImpl attributes = new AttributesImpl();
        attributes.addCDATAAttribute("src", source);
        handler.startElement(NAMESPACE, ELEMENT, QELEMENT, attributes);
        handler.endElement(NAMESPACE, ELEMENT, QELEMENT);
        handler.endPrefixMapping(PREFIX);
    }

View Full Code Here

    private static final String BOOLEAN_FIELD_EL = "booleanfield";
    private static final String VALUE_EL = "value";

    public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
        AttributesImpl fieldAttrs = new AttributesImpl();
        fieldAttrs.addCDATAAttribute("id", getFullyQualifiedId());
        contentHandler.startElement(Constants.WI_NS, BOOLEAN_FIELD_EL, Constants.WI_PREFIX_COLON + BOOLEAN_FIELD_EL, fieldAttrs);

        // value element
        contentHandler.startElement(Constants.WI_NS, VALUE_EL, Constants.WI_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
        String stringValue = String.valueOf(value != null && value.booleanValue() == true? "true": "false");
View Full Code Here

    private static final String OUTPUT_EL = "output";
    private static final String VALUE_EL = "value";

    public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
        AttributesImpl outputAttrs = new AttributesImpl();
        outputAttrs.addCDATAAttribute("id", getFullyQualifiedId());
        contentHandler.startElement(Constants.WI_NS, OUTPUT_EL, Constants.WI_PREFIX_COLON + OUTPUT_EL, outputAttrs);

        // the value
        if (value != null) {
            contentHandler.startElement(Constants.WI_NS, VALUE_EL, Constants.WI_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
View Full Code Here

            contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TRANSLATE_ELEMENT, "i18n:" + I18nTransformer.I18N_TRANSLATE_ELEMENT, Constants.EMPTY_ATTRS);
        }

        AttributesImpl i18nAttrs = new AttributesImpl();
        if (catalogue != null) {
            i18nAttrs.addCDATAAttribute(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_CATALOGUE_ATTRIBUTE, "i18n:" + I18nTransformer.I18N_CATALOGUE_ATTRIBUTE, catalogue);
        }

        contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT, "i18n:" + I18nTransformer.I18N_TEXT_ELEMENT, i18nAttrs);
        contentHandler.characters(key.toCharArray(), 0, key.length());
        contentHandler.endElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT, "i18n:" + I18nTransformer.I18N_TEXT_ELEMENT);
View Full Code Here

           
            // stream out the include for the serializer
            IncludingHTMLSerializer.addPortlet(portlet, value);
            contentHandler.startPrefixMapping("portal", IncludingHTMLSerializer.NAMESPACE);
            AttributesImpl attr = new AttributesImpl();
            attr.addCDATAAttribute("portlet", portlet);
            contentHandler.startElement(IncludingHTMLSerializer.NAMESPACE,
                                        "include", "portal:include", attr);
            contentHandler.endElement(IncludingHTMLSerializer.NAMESPACE,
                                      "include", "portal:include");
            contentHandler.endPrefixMapping("portal");
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.