Package org.apache.cocoon.xml

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


                    } else {
                        separator = '&';
                    }
                    newLink = bookmark + separator + newLink.substring(pos);
                }
                ai.addCDATAAttribute("href", newLink);

                final String linkElementName = this.parameters.getParameter("link-element", this.defaultLinkElement);
                final String linkElementNS = this.parameters.getParameter("link-element-ns", this.defaultLinkElementNS);
                XMLUtils.startElement(this.contentHandler, linkElementNS, linkElementName, ai);
            } catch (ServiceException se) {
View Full Code Here


            final String checkedAction = attr.getValue("checked");
            final Iterator i = actions.iterator();
            AttributesImpl a = new AttributesImpl();
            while ( i.hasNext() ) {
                final BasketManager.ActionInfo current = (ActionInfo) i.next();
                a.addCDATAAttribute("name", current.name);
                if ( current.name.equals(checkedAction) ) {
                    a.addCDATAAttribute("checked", "true");
                }
                XMLUtils.createElement(this.xmlConsumer, "action", a);
                a.clear();
View Full Code Here

            AttributesImpl a = new AttributesImpl();
            while ( i.hasNext() ) {
                final BasketManager.ActionInfo current = (ActionInfo) i.next();
                a.addCDATAAttribute("name", current.name);
                if ( current.name.equals(checkedAction) ) {
                    a.addCDATAAttribute("checked", "true");
                }
                XMLUtils.createElement(this.xmlConsumer, "action", a);
                a.clear();
            }
        }
View Full Code Here

        // Start document and "fi:fragment" root element
        domBuilder.startDocument();
        domBuilder.startPrefixMapping(Constants.INSTANCE_PREFIX, Constants.INSTANCE_NS);
        // FIXME: why simply declaring the prefix isn't enough?
        AttributesImpl attr = new AttributesImpl();
        attr.addCDATAAttribute(NamespaceSupport.XMLNS, "fi:", "xmlns:fi", Constants.INSTANCE_NS);
        domBuilder.startElement(Constants.INSTANCE_NS, "fragment", Constants.INSTANCE_PREFIX_COLON + "fragment", attr);
       
        widget.generateSaxFragment(domBuilder, locale);
       
        // End "fi:fragment" element and document
View Full Code Here

                ChangeAspectDataEvent event = null;

                // open named-item tag
                attributes.clear();
                if ( tab instanceof NamedItem ) {
                    attributes.addCDATAAttribute("name", String.valueOf(((NamedItem)tab).getName()));
                }
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                }
                event = new ChangeAspectDataEvent(tabLayout, config.aspectName, new Integer(j));
View Full Code Here

                attributes.clear();
                if ( tab instanceof NamedItem ) {
                    attributes.addCDATAAttribute("name", String.valueOf(((NamedItem)tab).getName()));
                }
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                }
                event = new ChangeAspectDataEvent(tabLayout, config.aspectName, new Integer(j));
                attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));

                // add parameters
View Full Code Here

                }
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                }
                event = new ChangeAspectDataEvent(tabLayout, config.aspectName, new Integer(j));
                attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));

                // add parameters
                final Iterator iter = tab.getParameters().entrySet().iterator();
                while ( iter.hasNext() ) {
                    final Map.Entry entry = (Map.Entry) iter.next();
View Full Code Here

                // 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

                if (tab instanceof NamedItem) {
                    if (!subNav && !config.childTagName.equals("")) {
                        XMLUtils.startElement(handler, config.childTagName);
                        subNav = true;
                    }
                    attributes.addCDATAAttribute("name",
                        String.valueOf(((NamedItem) tab).getName()));
                    ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout,
                        config.aspectName, new Integer(j));
                    List events = new ArrayList(parentEvents);
                    events.add(event);
View Full Code Here

                    ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout,
                        config.aspectName, new Integer(j));
                    List events = new ArrayList(parentEvents);
                    events.add(event);

                    attributes.addCDATAAttribute("parameter",
                        service.getComponentManager().getLinkService().getLinkURI(events));

                    // add parameters
                    final Iterator iter = tab.getParameters().entrySet().iterator();
                    while (iter.hasNext()) {
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.