Package org.apache.cocoon.stax.navigation

Examples of org.apache.cocoon.stax.navigation.FindStartElementNavigator


     * @param newAttributes
     *            The new attributes of the element.
     */
    public StartElementAttributeModificationTransformer(String name, List<Attribute> attributes,
            List<Attribute> newAttributes) {
        this.navigator = new FindStartElementNavigator(name, attributes);
        XMLEventFactory factory = XMLEventFactory.newInstance();

        this.newStartElement = factory.createStartElement(new QName(name), newAttributes.iterator(), null);
    }
View Full Code Here


     * @return a linkInfo object
     * @throws XMLStreamException
     */
    private LinkInfo collectLinkInfo(List<XMLEvent> events) throws XMLStreamException {
        Navigator linkInfoNavigator = new InSubtreeNavigator(LINK_INFO_EL);
        Navigator linkInfoPartNavigator = new FindStartElementNavigator(LINK_PART_INFO_EL);
        LinkInfo linkInfo = null;

        while (this.getParent().hasNext()) {
            XMLEvent event = this.getParent().peek();

            if (linkInfoNavigator.fulfillsCriteria(event)) {
                event = this.getParent().nextEvent();
                if (linkInfoPartNavigator.fulfillsCriteria(event)) {
                    if (linkInfo == null) {
                        throw new ProcessingException(new NullPointerException(
                                "The LinkInfo object mustn't be null here."));
                    }

View Full Code Here

     * @param name The name of the element inside of which the "new" element will be added.
     * @param attributes The attributes the element must contain in order to be expanded by the
     *            "new" element.
     */
    public ExampleAddTransformer(String name, List<Attribute> attributes) {
        this.navigator = new FindStartElementNavigator(name, attributes);
    }
View Full Code Here

     * @param childElement The name the created children shall have.
     * @param elementCount The number of identical children that shall be emitted.
     */
    public EmitElementTransformer(String parentElementName, List<Attribute> parentElementAttributes,
            String childElement, int elementCount) {
        this.navigator = new FindStartElementNavigator(parentElementName, parentElementAttributes);
        this.childElementName = childElement;
        this.elementCount = elementCount;
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.stax.navigation.FindStartElementNavigator

Copyright © 2018 www.massapicom. 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.