cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r733286 [2/2] - in /cocoon/cocoon3/trunk/cocoon-stax/src: main/java/org/apache/cocoon/stax/ main/java/org/apache/cocoon/stax/navigation/ test/java/org/apache/cocoon/stax/ test/java/org/apache/cocoon/stax/sample/ test/java/org/apache/cocoon/...
Date Sat, 10 Jan 2009 15:48:39 GMT
Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java Sat Jan 10 07:48:37 2009
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.cocoon.stax.sample.test;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+import org.apache.cocoon.pipeline.NonCachingPipeline;
+import org.apache.cocoon.pipeline.Pipeline;
+import org.apache.cocoon.stax.StAXGenerator;
+import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.sample.src.ExampleComplexTransformer;
+import org.apache.commons.io.IOUtils;
+import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.Test;
+
+/**
+ * Contains unit tests showing how a transformer could work that performs
+ * several tasks such as modifying, deleting or adding elements at the same
+ * time.<br> * Shows a transformer, modifying a document, adding elements and
+ * deleting other at the same time.
+ */
+public class ComplexTransformerTest {
+
+    /**
+     * Shows a transformer, modifying a document, adding elements and deleting
+     * other at the same time.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testComplexOperations() throws Exception {
+        InputStream input = ComplexTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        pipe.addComponent(new ExampleComplexTransformer());
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(ComplexTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document-complex.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java Sat Jan 10 07:48:37 2009
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.cocoon.stax.sample.test;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.stream.XMLEventFactory;
+import javax.xml.stream.events.Attribute;
+
+import org.apache.cocoon.pipeline.NonCachingPipeline;
+import org.apache.cocoon.pipeline.Pipeline;
+import org.apache.cocoon.stax.StAXGenerator;
+import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.sample.src.DeletionTransformer;
+import org.apache.commons.io.IOUtils;
+import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.Test;
+
+/**
+ * Contains unit tests showing how a transformer could work that allows to
+ * delete subtrees inside of a document.<br> * Show correct deletion of a
+ * subtree beginning with a specific element containing a specific attribute.<br> *
+ * Show that trying to delete a subtree beginning with a specific element
+ * containing a specific attribute will not affect elements containing only some
+ * of these attributes.
+ */
+public class DeletionTransformerTest {
+
+    /**
+     * Show correct deletion of a subtree beginning with a specific element
+     * containing a specific attribute.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testDeletion() throws Exception {
+        InputStream input = DeletionTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        DeletionTransformer deleter = new DeletionTransformer("anyelement", atts);
+        pipe.addComponent(deleter);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(DeletionTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/" + "stax-test-document-clean.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+
+    /**
+     * Show that trying to delete a subtree beginning with a specific element
+     * containing a specific attribute will not affect elements containing only
+     * some of these attributes.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testNoDeletion() throws Exception {
+        InputStream input = DeletionTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        atts.add(factory.createAttribute("attribute", "good"));
+        DeletionTransformer deleter = new DeletionTransformer("anyelement", atts);
+        pipe.addComponent(deleter);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(DeletionTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/" + "stax-test-document.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java Sat Jan 10 07:48:37 2009
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.cocoon.stax.sample.test;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.stream.XMLEventFactory;
+import javax.xml.stream.events.Attribute;
+
+import org.apache.cocoon.pipeline.NonCachingPipeline;
+import org.apache.cocoon.pipeline.Pipeline;
+import org.apache.cocoon.stax.StAXGenerator;
+import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.sample.src.StartElementAttributeModificationTransformer;
+import org.apache.commons.io.IOUtils;
+import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.Test;
+
+/**
+ * Contains unit tests showing how a transformer could work that allows to
+ * modify the attributes of elements.<br> * Show correct modification of an
+ * attribute of a specific element.<br> * Show that trying to modify an element
+ * with several attributes will not affect elements containing only some of
+ * these attributes.
+ */
+public class StartElementAttributeModifaicationTransformerTest {
+
+    /**
+     * Show correct modification of an attribute of a specific element.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testModification() throws Exception {
+        InputStream input = StartElementAttributeModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        List<Attribute> newAtts = new ArrayList<Attribute>();
+        newAtts.add(factory.createAttribute("attribute", "good"));
+        StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
+                "anyelement", atts, newAtts);
+        pipe.addComponent(modifier);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(StartElementAttributeModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/" + "stax-test-document-modified2.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+
+    /**
+     * Show that trying to modify an element with several attributes will not
+     * affect elements containing only some of these attributes.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testNoModification() throws Exception {
+        InputStream input = StartElementAttributeModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        atts.add(factory.createAttribute("attribute", "good"));
+        List<Attribute> newAtts = new ArrayList<Attribute>();
+        StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
+                "anyelement", atts, newAtts);
+        pipe.addComponent(modifier);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(StartElementAttributeModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/" + "stax-test-document.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java Sat Jan 10 07:48:37 2009
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.cocoon.stax.sample.test;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.stream.XMLEventFactory;
+import javax.xml.stream.events.Attribute;
+
+import org.apache.cocoon.pipeline.NonCachingPipeline;
+import org.apache.cocoon.pipeline.Pipeline;
+import org.apache.cocoon.stax.StAXGenerator;
+import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.sample.src.StartEndElementPairModificationTransformer;
+import org.apache.commons.io.IOUtils;
+import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.Test;
+
+/**
+ * Contains unit test showing how a transformer could work that allows to modify
+ * element pairs (modifies Start- and EndElements).
+ * 
+ * <ul>
+ * <li>Show the correct modification of all elements with a special name and
+ * with special attributes to another element.
+ * <li>
+ * <li>Show that trying to modify elements with several attributes will not
+ * affect elements containing only some of the elements.</li>
+ * <li>Show that modification will not affect nested elements with same name
+ * but different attributes.</li>
+ * </ul>
+ */
+public class StartEndElementPairModifaicationTransformerTest {
+
+    /**
+     * Modifies all elements with a special name and with special attributes to
+     * another element.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testModification() throws Exception {
+        InputStream input = StartEndElementPairModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
+                "anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
+        pipe.addComponent(modifier);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(StartEndElementPairModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/" + "stax-test-document-modified1.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+
+    /**
+     * Tests that trying to modify elements with several attributes will not
+     * affect elements containing only some of the elements.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testNoModification() throws Exception {
+        InputStream input = StartEndElementPairModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        atts.add(factory.createAttribute("attribute", "good"));
+        StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
+                "anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
+        pipe.addComponent(modifier);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(StartEndElementPairModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/" + "stax-test-document.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+
+    /**
+     * Tests that modification will not affect nested elements with same name
+     * but different attributes.
+     * 
+     * @throws Exception Is thrown if an error occurs loading the files or in
+     *             the pipeline itself.
+     */
+    @Test
+    public void testModificationNestedDifferent() throws Exception {
+        InputStream input = StartEndElementPairModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml").openStream();
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+        Pipeline pipe = new NonCachingPipeline();
+        pipe.addComponent(new StAXGenerator(input));
+        XMLEventFactory factory = XMLEventFactory.newInstance();
+        List<Attribute> atts = new ArrayList<Attribute>();
+        atts.add(factory.createAttribute("attribute", "bad"));
+        StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
+                "anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
+        pipe.addComponent(modifier);
+        pipe.addComponent(new StAXSerializer());
+        pipe.setup(out);
+        pipe.execute();
+
+        input.close();
+        String created = out.toString();
+        out.close();
+        String correctOne = IOUtils.toString(StartEndElementPairModifaicationTransformerTest.class.getResource(
+                "/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml").openStream());
+
+        XMLUnit.setIgnoreWhitespace(true);
+        Diff myDiff = new Diff(correctOne, created);
+        assertTrue("pieces of XML are similar " + myDiff, myDiff.similar());
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<wsdl:definitions name="CustomersWrapperServiceService"
+  targetNamespace="http://infosys.tuwien.ac.at/ait08/ass1/dto/customers"
+  xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:tns="http://infosys.tuwien.ac.at/ait08/ass1/dto/customers" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified"
+      targetNamespace="http://infosys.tuwien.ac.at/ait08/ass1/dto/customers"
+      xmlns:tns="http://infosys.tuwien.ac.at/ait08/ass1/dto/customers" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:element name="Telephone_Number" type="tns:telephoneNumber" />
+      <xs:element name="adresse" type="tns:address" />
+      <xs:element name="customer" type="tns:customer" />
+      <xs:element name="get_customer" type="tns:get_customer" />
+      <xs:element name="get_customerResponse" type="tns:get_customerResponse" />
+      <xs:element name="update_customer" type="tns:update_customer" />
+      <xs:element name="update_customerResponse" type="tns:update_customerResponse" />
+      <xs:complexType name="update_customer">
+        <xs:sequence>
+          <xs:element minOccurs="0" name="toUpdate" type="tns:customer" />
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="customer">
+        <xs:sequence>
+          <xs:element minOccurs="0" name="address" type="tns:address" />
+          <xs:element minOccurs="0" name="id" type="xs:string" />
+          <xs:element minOccurs="0" name="name" type="xs:string" />
+          <xs:element name="provider" type="xs:long" />
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="telephoneNumbers" nillable="true"
+            type="tns:telephoneNumber" />
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="address">
+        <xs:sequence>
+          <xs:element minOccurs="0" name="area_code" type="xs:string" />
+          <xs:element minOccurs="0" name="city" type="xs:string" />
+          <xs:element name="door" type="xs:int" />
+          <xs:element name="house" type="xs:int" />
+          <xs:element minOccurs="0" name="id" type="xs:string" />
+          <xs:element minOccurs="0" name="street" type="xs:string" />
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="telephoneNumber">
+        <xs:sequence>
+          <xs:element minOccurs="0" name="area_code" type="xs:string" />
+          <xs:element minOccurs="0" name="country_code" type="xs:string" />
+          <xs:element name="dbId" type="xs:long" />
+          <xs:element minOccurs="0" name="id" type="xs:string" />
+          <xs:element minOccurs="0" name="number" type="xs:string" />
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="update_customerResponse">
+        <xs:sequence />
+      </xs:complexType>
+      <xs:complexType name="get_customer">
+        <xs:sequence>
+          <xs:element minOccurs="0" name="id" type="xs:string" />
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="get_customerResponse">
+        <xs:sequence>
+          <xs:element minOccurs="0" name="existing_customer" type="tns:customer" />
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="InvalidCustomerFault" type="tns:InvalidCustomerFault" />
+      <xs:complexType name="InvalidCustomerFault">
+        <xs:sequence />
+      </xs:complexType>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="get_customerResponse">
+    <wsdl:part element="tns:get_customerResponse" name="parameters"></wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="InvalidCustomerException">
+    <wsdl:part element="tns:InvalidCustomerFault" name="InvalidCustomerException"></wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="get_customer">
+    <wsdl:part element="tns:get_customer" name="parameters"></wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="update_customer">
+    <wsdl:part element="tns:update_customer" name="parameters"></wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="update_customerResponse">
+    <wsdl:part element="tns:update_customerResponse" name="parameters"></wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="CustomersWrapperService">
+    <wsdl:operation name="update_customer">
+      <wsdl:input message="tns:update_customer" name="update_customer"></wsdl:input>
+      <wsdl:output message="tns:update_customerResponse" name="update_customerResponse"></wsdl:output>
+      <wsdl:fault message="tns:InvalidCustomerException" name="InvalidCustomerException"></wsdl:fault>
+    </wsdl:operation>
+    <wsdl:operation name="get_customer">
+      <wsdl:input message="tns:get_customer" name="get_customer"></wsdl:input>
+      <wsdl:output message="tns:get_customerResponse" name="get_customerResponse"></wsdl:output>
+      <wsdl:fault message="tns:InvalidCustomerException" name="InvalidCustomerException"></wsdl:fault>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="CustomersWrapperServiceServiceSoapBinding" type="tns:CustomersWrapperService">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="update_customer">
+      <soap:operation soapAction="" style="document" />
+      <wsdl:input name="update_customer">
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output name="update_customerResponse">
+        <soap:body use="literal" />
+      </wsdl:output>
+      <wsdl:fault name="InvalidCustomerException">
+        <soap:fault name="InvalidCustomerException" use="literal" />
+      </wsdl:fault>
+    </wsdl:operation>
+    <wsdl:operation name="get_customer">
+      <soap:operation soapAction="" style="document" />
+      <wsdl:input name="get_customer">
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output name="get_customerResponse">
+        <soap:body use="literal" />
+      </wsdl:output>
+      <wsdl:fault name="InvalidCustomerException">
+        <soap:fault name="InvalidCustomerException" use="literal" />
+      </wsdl:fault>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="CustomersWrapperServiceService">
+    <wsdl:port binding="tns:CustomersWrapperServiceServiceSoapBinding" name="CustomersPT">
+      <soap:address location="http://localhost:9085/customersService" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/complex-stax-test-document.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <anyelement attribute="bad">
+      <reason>too old</reason>
+    </anyelement>
+    <somethingdifferent>
+      <new></new>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>too good looking</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>named Morris</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>big ears</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>likes big cars</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <new></new>
+    </somethingdifferent>
+    <anyelement attribute="bad">
+      <reason>drinks too much</reason>
+      <anyelement attribute="bad">
+        <reason>named Morris</reason>
+      </anyelement>
+    </anyelement>
+  </level2>
+  <level2>
+    <anyelement attribute="bad">
+      <reason>too old</reason>
+    </anyelement>
+    <somethingdifferent>
+      <new></new>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>too good looking</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>named Morris</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>big ears</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>likes big cars</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <new></new>
+    </somethingdifferent>
+    <anyelement attribute="bad">
+      <reason>drinks too much</reason>
+      <anyelement attribute="bad">
+        <reason>named Morris</reason>
+      </anyelement>
+    </anyelement>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-add.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+  </level2>
+  <level2>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-clean.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <somethingdifferent attribute="neutral">
+      <reason>too old</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>too good looking</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>named Morris</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>big ears</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>likes big cars</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>drinks too much</reason>
+      <somethingdifferent attribute="neutral">
+        <reason>named Morris</reason>
+        <color>green</color>
+        <addition></addition>
+      </somethingdifferent>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+  </level2>
+  <level2>
+    <somethingdifferent attribute="neutral">
+      <reason>too old</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>too good looking</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>named Morris</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>big ears</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>likes big cars</reason>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent attribute="neutral">
+      <reason>drinks too much</reason>
+      <somethingdifferent attribute="neutral">
+        <reason>named Morris</reason>
+        <color>green</color>
+        <addition></addition>
+      </somethingdifferent>
+      <color>green</color>
+      <addition></addition>
+    </somethingdifferent>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-complex.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <somethingdifferent>
+      <reason>too old</reason>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>too good looking</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>named Morris</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>big ears</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>likes big cars</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent>
+      <reason>drinks too much</reason>
+      <somethingdifferent>
+        <reason>named Morris</reason>
+      </somethingdifferent>
+    </somethingdifferent>
+  </level2>
+  <level2>
+    <somethingdifferent>
+      <reason>too old</reason>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>too good looking</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>named Morris</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>big ears</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>likes big cars</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent>
+      <reason>drinks too much</reason>
+      <somethingdifferent>
+        <reason>named Morris</reason>
+      </somethingdifferent>
+    </somethingdifferent>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+	<level2>
+		<anyelement attribute="good">
+			<reason>too old</reason>
+		</anyelement>
+		<somethingdifferent>
+		</somethingdifferent>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>too good looking</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>named Morris</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>big ears</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>likes big cars</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<somethingdifferent>
+		</somethingdifferent>
+		<anyelement attribute="good">
+			<reason>drinks too much</reason>
+			<anyelement attribute="good">
+				<reason>named Morris</reason>
+			</anyelement>
+		</anyelement>
+	</level2>
+	<level2>
+		<anyelement attribute="good">
+			<reason>too old</reason>
+		</anyelement>
+		<somethingdifferent>
+		</somethingdifferent>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>too good looking</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>named Morris</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>big ears</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<anyelement attribute="good">
+			<reason>likes big cars</reason>
+		</anyelement>
+		<anyelement attribute="good">
+		</anyelement>
+		<somethingdifferent>
+		</somethingdifferent>
+		<anyelement attribute="good">
+			<reason>drinks too much</reason>
+			<anyelement attribute="good">
+				<reason>named Morris</reason>
+			</anyelement>
+		</anyelement>
+	</level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-modified2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <somethingdifferent>
+      <reason>too old</reason>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>too good looking</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>named Morris</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>big ears</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>likes big cars</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent>
+      <reason>drinks too much</reason>
+      <anyelement attribute="good"></anyelement>
+    </somethingdifferent>
+  </level2>
+  <level2>
+    <somethingdifferent>
+      <reason>too old</reason>
+    </somethingdifferent>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>too good looking</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>named Morris</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>big ears</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent>
+      <reason>likes big cars</reason>
+    </somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <somethingdifferent>
+      <reason>drinks too much</reason>
+      <anyelement attribute="good"></anyelement>
+    </somethingdifferent>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent-modified.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <anyelement attribute="bad">
+      <reason>too old</reason>
+    </anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>too good looking</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>named Morris</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>big ears</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>likes big cars</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="bad">
+      <reason>drinks too much</reason>
+      <anyelement attribute="good"></anyelement>
+    </anyelement>
+  </level2>
+  <level2>
+    <anyelement attribute="bad">
+      <reason>too old</reason>
+    </anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>too good looking</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>named Morris</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>big ears</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>likes big cars</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="bad">
+      <reason>drinks too much</reason>
+      <anyelement attribute="good"></anyelement>
+    </anyelement>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document-nestedDifferent.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml?rev=733286&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml Sat Jan 10 07:48:37 2009
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<root>
+  <level2>
+    <anyelement attribute="bad">
+      <reason>too old</reason>
+    </anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>too good looking</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>named Morris</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>big ears</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>likes big cars</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="bad">
+      <reason>drinks too much</reason>
+      <anyelement attribute="bad">
+        <reason>named Morris</reason>
+      </anyelement>
+    </anyelement>
+  </level2>
+  <level2>
+    <anyelement attribute="bad">
+      <reason>too old</reason>
+    </anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>too good looking</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>named Morris</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>big ears</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <anyelement attribute="bad">
+      <reason>likes big cars</reason>
+    </anyelement>
+    <anyelement attribute="good"></anyelement>
+    <somethingdifferent></somethingdifferent>
+    <anyelement attribute="bad">
+      <reason>drinks too much</reason>
+      <anyelement attribute="bad">
+        <reason>named Morris</reason>
+      </anyelement>
+    </anyelement>
+  </level2>
+</root>

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/sample/stax-test-document.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/simple.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/simple.xml?rev=733286&r1=733285&r2=733286&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/simple.xml (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/resources/org/apache/cocoon/stax/simple.xml Sat Jan 10 07:48:37 2009
@@ -1,21 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
- -->
-
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
 <simple>simple-text</simple>



Mime
View raw message