cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jheym...@apache.org
Subject svn commit: r330548 [79/132] - in /cocoon/whiteboard/maven2/cocoon-flat-layout: ./ cocoon-ajax-block/ cocoon-ajax-block/api/ cocoon-ajax-block/api/src/ cocoon-ajax-block/api/src/main/ cocoon-ajax-block/api/src/main/java/ cocoon-ajax-block/api/src/main/...
Date Thu, 03 Nov 2005 14:00:48 GMT
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestBootstrapEnvironment.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestBootstrapEnvironment.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestBootstrapEnvironment.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestBootstrapEnvironment.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,125 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.test.core;
+
+import java.io.File;
+import java.net.URL;
+
+import org.apache.avalon.framework.context.DefaultContext;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.cocoon.core.BootstrapEnvironment;
+import org.apache.cocoon.core.MutableSettings;
+import org.apache.cocoon.environment.Context;
+
+public class TestBootstrapEnvironment
+    implements BootstrapEnvironment {
+    
+    private final String configuration;
+    private final String contextPath;
+    public Logger logger;
+    private final Context environmentContext;
+
+    public TestBootstrapEnvironment(String configuration,
+                                    String contextPath,
+                                    Context environmentContext,
+				                    Logger logger) {
+        this.configuration = configuration;
+        this.contextPath = contextPath;
+        this.environmentContext = environmentContext;
+
+        this.logger = logger;
+    }
+
+    /**
+     * @see org.apache.cocoon.core.BootstrapEnvironment#getBootstrapLogger(org.apache.cocoon.core.BootstrapEnvironment.LogLevel)
+     */
+    public Logger getBootstrapLogger(LogLevel logLevel) {
+        return this.logger;
+    }
+
+    /** Log a message during bootstrapping. This is used to log
+     * information before the logging system is setup.
+     * @param message A message.
+     */
+    public void log(String message) {
+        this.logger.info(message);
+    }
+
+    /** Log a message during bootstrapping. This is used to log
+     * information before the logging system is setup.
+     * @param message A message.
+     * @param error   An error.
+     */
+    public void log(String message, Throwable error) {
+        this.logger.info(message, error);
+    }
+
+    /**
+     * Pass the root logger back to the environment. As soon as the
+     * logging system is set up, this method is called.
+     * @param rootLogger The root logger.
+     */
+    public void setLogger(Logger rootLogger) {
+        this.logger = rootLogger;
+    }
+
+    /**
+     * @see org.apache.cocoon.core.BootstrapEnvironment#configure(org.apache.cocoon.core.MutableSettings)
+     */
+    public void configure(MutableSettings settings) {
+        settings.setConfiguration(this.configuration);
+        settings.setWorkDirectory("work");
+    }
+
+    public void configureLoggingContext(DefaultContext context) {
+        // simply do nothing
+    }
+
+    public void configure(DefaultContext context) {
+    }
+
+    public Context getEnvironmentContext() {
+        return this.environmentContext;
+    }
+    
+    /**
+     * Returns the URL to the application context.
+     */
+    public String getContextURL() {
+        return this.contextPath;
+    }
+
+    /**
+     * Returns a file to the application context.
+     * @return A file pointing to the context or null if the context is not
+     *         writeable.
+     */
+    public File getContextForWriting() {
+        return null;
+    }
+
+    /**
+     * Set the ConfigFile for the Cocoon object.
+     *
+     * @param configFileName The file location for the cocoon.xconf
+     *
+     * @throws Exception
+     */
+    public URL getConfigFile(String configFileName) throws Exception {
+        return new URL(this.contextPath + configFileName);
+    }
+
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestBootstrapEnvironment.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestCoreUtil.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestCoreUtil.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestCoreUtil.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestCoreUtil.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,61 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.test.core;
+
+import org.apache.avalon.excalibur.logger.LoggerManager;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.cocoon.core.BootstrapEnvironment;
+import org.apache.cocoon.core.CoreUtil;
+
+public class TestCoreUtil extends CoreUtil {
+    public TestCoreUtil(BootstrapEnvironment env) throws Exception {
+        super(env);
+        this.classloader = TestCoreUtil.class.getClassLoader();
+    }
+
+    // Simplified logging
+    protected void initLogger() {
+        this.log = ((TestBootstrapEnvironment)this.env).logger;
+        this.loggerManager = new DefaultLoggerManager(this.log);
+    }
+
+    // Simplified classloader handling
+    protected void updateEnvironment() throws Exception {}
+
+    /**
+     * We use this simple logger manager that sends all output to the console (logger)
+     */
+    protected static class DefaultLoggerManager implements LoggerManager {
+        
+        private Logger logger;
+        
+        public DefaultLoggerManager(Logger logger) {
+            this.logger = logger;
+        }
+        /* (non-Javadoc)
+         * @see org.apache.avalon.excalibur.logger.LoggerManager#getDefaultLogger()
+         */
+        public Logger getDefaultLogger() {
+            return this.logger;
+        }
+        /* (non-Javadoc)
+         * @see org.apache.avalon.excalibur.logger.LoggerManager#getLoggerForCategory(java.lang.String)
+         */
+        public Logger getLoggerForCategory(String arg0) {
+            return this.logger;
+        }
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/core/TestCoreUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,79 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+import org.w3c.dom.Document;
+
+
+/**
+ * A simple testcase for AugmentTransformer.
+ *
+ * @author <a href="mailto:huber@apache.org">Bernhard Huber</a>
+ * @version CVS $Id: AugmentTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class AugmentTransformerTestCase extends SitemapComponentTestCase {
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.SitemapComponentTestCase#getSitemapComponentInfo()
+     */
+    protected String[] getSitemapComponentInfo() {
+        return new String[] {Transformer.class.getName(),
+                             AugmentTransformer.class.getName(),
+                             "augment"};
+    }
+
+    /** Testcase for augment transformation
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testAugment1() throws Exception {
+        getLogger().debug("testAugment1");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "mount", "portal1/sect1/" );
+        
+        String input = "resource://org/apache/cocoon/transformation/augment-input-1.xml";
+        String result = "resource://org/apache/cocoon/transformation/augment-result-1.xml";
+        String src =  null;
+        
+        Document resultDocument = load(result);
+        Document inputDocument = load(input);
+        Document transformDocument = transform("augment", src, parameters, inputDocument );
+        
+        printDocs( resultDocument, inputDocument, transformDocument );
+        
+        assertIdentical( resultDocument, transformDocument );
+    }
+    
+    /**
+     * print documents to System.out
+     *
+     * @param resultDocument the expected result document
+     * @param inputDocument the input document
+     * @param transformDocument  the transformed input document
+     */
+    protected void printDocs( Document resultDocument, Document inputDocument, Document transformDocument ) {
+        System.out.println( "resultDocument" );
+        this.print( resultDocument );
+        System.out.println( "inputDocument" );
+        this.print( inputDocument );
+        System.out.println( "transformDocument" );
+        this.print( transformDocument );
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/AugmentTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,74 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <context>
+   <entry name="root-url" value="/"/>
+ </context>
+
+ <roles>
+  <role name="org.apache.excalibur.xml.dom.DOMParser"
+        shorthand="dom-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+        
+  <role name="org.apache.excalibur.xml.xpath.XPathProcessor"
+        shorthand="xpath-processor"
+        default-class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,94 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+
+/**
+ * A simple testcase for FilterTransformer.
+ *
+ * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
+ * @version CVS $Id: CIncludeTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class CIncludeTransformerTestCase extends SitemapComponentTestCase {
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.SitemapComponentTestCase#getSitemapComponentInfo()
+     */
+    protected String[] getSitemapComponentInfo() {
+        return new String[] {Transformer.class.getName(),
+                             CIncludeTransformer.class.getName(),
+                             "cinclude"};
+    }
+
+    /** Testcase for cinclude simple include
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testCInclude1() throws Exception {
+        getLogger().debug("testCInclude1");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "support-caching", "false" );
+        
+        String input = "resource://org/apache/cocoon/transformation/cinclude-input-1.xml";
+        String result = "resource://org/apache/cocoon/transformation/cinclude-result-1.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("cinclude", src, parameters, load(input)));
+    }
+    
+    /**
+     * Testcase for cinclude specifying element for wrapping included content
+     *
+     * @throws Exception if  enterEnvironment fails
+     */
+    public void testCInclude2() throws Exception {
+        getLogger().debug("testCInclude2");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "support-caching", "false" );
+        
+        String input = "resource://org/apache/cocoon/transformation/cinclude-input-2.xml";
+        String result = "resource://org/apache/cocoon/transformation/cinclude-result-2.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("cinclude", src, parameters, load(input)));
+    }
+    
+    /**
+     * Testcase for cinclude specifying select attribute, selection elements from the included document
+     *
+     * @throws Exception if  enterEnvironment fails
+     */
+    public void testCInclude3() throws Exception {
+        getLogger().debug("testCInclude3");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "support-caching", "false" );
+        
+        String input = "resource://org/apache/cocoon/transformation/cinclude-input-3.xml";
+        String result = "resource://org/apache/cocoon/transformation/cinclude-result-3.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("cinclude", src, parameters, load(input)));
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/CIncludeTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,72 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <context>
+   <entry name="root-url" value="/"/>
+ </context>
+
+ <roles>
+  <role name="org.apache.excalibur.xml.dom.DOMParser"
+        shorthand="dom-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+        
+  <role name="org.apache.excalibur.xml.xpath.XPathProcessor"
+        shorthand="xpath-processor"
+        default-class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,113 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+import org.apache.cocoon.environment.mock.MockRequest;
+import org.apache.cocoon.environment.mock.MockResponse;
+import org.apache.cocoon.environment.mock.MockSession;
+import org.w3c.dom.Document;
+
+
+/**
+ * A simple testcase for FilterTransformer.
+ *
+ * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
+ * @version CVS $Id: EncodeURLTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class EncodeURLTransformerTestCase extends SitemapComponentTestCase {
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.SitemapComponentTestCase#getSitemapComponentInfo()
+     */
+    protected String[] getSitemapComponentInfo() {
+        return new String[] {Transformer.class.getName(),
+                             EncodeURLTransformer.class.getName(),
+                             "encodeurl"};
+    }
+    
+    /** Testcase for encode url transformation
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testEncodeURL1() throws Exception {
+        getLogger().debug("testEncodeURL1");
+        
+        Parameters parameters = new Parameters();
+        
+        String input = "resource://org/apache/cocoon/transformation/encodeurl-input-1.xml";
+        String result = "resource://org/apache/cocoon/transformation/encodeurl-result-1.xml";
+        String src =  null;
+        
+        Document inputDocument = load(input);
+        Document resultDocument = load(result);
+        Document transformDocument = transform("encodeurl", src, parameters, inputDocument);
+        
+        printDocs( resultDocument, inputDocument, transformDocument );
+        
+        assertIdentical( resultDocument, transformDocument );
+    }
+    
+    /** Testcase for encode url transformation
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testEncodeURL2() throws Exception {
+        getLogger().debug("testEncodeURL2");
+        
+        Parameters parameters = new Parameters();
+        
+        String input = "resource://org/apache/cocoon/transformation/encodeurl-input-2.xml";
+        String result = "resource://org/apache/cocoon/transformation/encodeurl-result-2.xml";
+        String src =  null;
+        
+        // force that sessionId is added to an URL
+        MockRequest request = getRequest();
+        MockSession session = (MockSession)request.getSession();
+        MockResponse response = getResponse();
+        
+        response.setSession(session);
+        getRequest().setIsRequestedSessionIdFromURL( true );
+
+        session.setIsNew(true);
+        
+        Document inputDocument = load(input);
+        Document resultDocument = load(result);
+        Document transformDocument = transform("encodeurl", src, parameters, inputDocument);
+        
+        printDocs( resultDocument, inputDocument, transformDocument );
+        assertIdentical( resultDocument, transformDocument );
+    }
+    
+    /**
+     * print documents to System.out
+     *
+     * @param resultDocument the expected result document
+     * @param inputDocument the input document
+     * @param transformDocument  the transformed input document
+     */
+    protected void printDocs( Document resultDocument, Document inputDocument, Document transformDocument ) {
+        System.out.println( "resultDocument" );
+        this.print( resultDocument );
+        System.out.println( "inputDocument" );
+        this.print( inputDocument );
+        System.out.println( "transformDocument" );
+        this.print( transformDocument );
+    }
+    
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/EncodeURLTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,73 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <context>
+   <entry name="root-url" value="/"/>
+ </context>
+
+ <roles>
+  <role name="org.apache.excalibur.xml.dom.DOMParser"
+        shorthand="dom-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+        
+  <role name="org.apache.excalibur.xml.xpath.XPathProcessor"
+        shorthand="xpath-processor"
+        default-class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,92 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+
+/**
+ * A simple testcase for FilterTransformer.
+ *
+ * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
+ * @version CVS $Id: FilterTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class FilterTransformerTestCase extends SitemapComponentTestCase {
+
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.SitemapComponentTestCase#getSitemapComponentInfo()
+     */
+    protected String[] getSitemapComponentInfo() {
+        return new String[] {Transformer.class.getName(),
+                             FilterTransformer.class.getName(),
+                             "filter"};
+    }
+
+    /**
+     * Testcase for count=1, blocknr=1
+     */
+    public void testFilter_1_1() throws Exception {
+        getLogger().debug("testFilter_1_1");
+
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "element-name", "leaf" );
+        parameters.setParameter( "count", "1" );
+        parameters.setParameter( "blocknr", "1" );
+
+        String input = "resource://org/apache/cocoon/transformation/filter-input.xml";
+        String result = "resource://org/apache/cocoon/transformation/filter-result-1-1.xml";
+        String src =  null;
+        
+        assertEqual(load(result), transform("filter", src, parameters, load(input)));
+    }
+    
+    /**
+     * Testcase for count=3, blocknr=1
+     */
+    public void testFilter_3_1() throws Exception {
+        getLogger().debug("testFilter_3_1");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "element-name", "leaf" );
+        parameters.setParameter( "count", "3" );
+        parameters.setParameter( "blocknr", "1" );
+        
+        String input = "resource://org/apache/cocoon/transformation/filter-input.xml";
+        String result = "resource://org/apache/cocoon/transformation/filter-result-3-1.xml";
+        String src =  null;
+        
+        assertEqual(load(result), transform("filter", src, parameters, load(input)));
+    }
+
+    /**
+     * Testcase for count=1, blocknr=3
+     */
+    public void testFilter_1_3() throws Exception {
+        getLogger().debug("testFilter_1_3");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "element-name", "leaf" );
+        parameters.setParameter( "count", "1" );
+        parameters.setParameter( "blocknr", "3" );
+        
+        String input = "resource://org/apache/cocoon/transformation/filter-input.xml";
+        String result = "resource://org/apache/cocoon/transformation/filter-result-1-3.xml";
+        String src =  null;
+        
+        assertEqual(load(result), transform("filter", src, parameters, load(input)));
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/FilterTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,62 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <roles>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,65 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+
+/**
+ * A simple testcase for I18nTransformer.
+ *
+ * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
+ * @version CVS $Id: I18NTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class I18NTransformerTestCase extends SitemapComponentTestCase {
+    
+    /** Testcase for i18n
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testI18n1() throws Exception {
+        getLogger().debug("testI18n1");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "support-caching", "false" );
+        
+        String input = "resource://org/apache/cocoon/transformation/i18n-input-1.xml";
+        String result = "resource://org/apache/cocoon/transformation/i18n-result-1.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("i18n", src, parameters, load(input)));
+    }
+    
+    /** Testcase for i18n
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testI18n2() throws Exception {
+        getLogger().debug("testI18n2");
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "support-caching", "false" );
+        
+        String input = "resource://org/apache/cocoon/transformation/i18n-input-2.xml";
+        String result = "resource://org/apache/cocoon/transformation/i18n-result-2.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("i18n", src, parameters, load(input)));
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/I18NTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,99 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <context>
+   <entry name="root-url" value="/"/>
+ </context>
+
+ <roles>
+  <role name="org.apache.excalibur.xml.dom.DOMParser"
+        shorthand="dom-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+        
+  <role name="org.apache.excalibur.xml.xpath.XPathProcessor"
+        shorthand="xpath-processor"
+        default-class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"/>
+
+  <role name="org.apache.cocoon.transformation.TransformerSelector"
+        shorthand="transformers"
+        default-class="org.apache.cocoon.core.container.StandaloneServiceSelector"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <!-- i18n components for resource bundle handling -->
+  <role name="org.apache.cocoon.i18n.BundleFactory"
+        shorthand="i18n-bundles"
+        default-class="org.apache.cocoon.i18n.XMLResourceBundleFactory"/>
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+  
+  <i18n-bundles logger="core.i18n-bundles">
+    <catalogue-name>messages</catalogue-name>
+    <catalogue-location>resource://org/apache/cocoon/transformation</catalogue-location>
+    <cache-at-startup>true</cache-at-startup>
+  </i18n-bundles>
+
+  <transformers logger="test">
+   <component-instance class="org.apache.cocoon.transformation.I18nTransformer" 
+                       name="i18n">
+    <catalogues default="messages">
+      <catalogue id="messages" name="i18n-messages" location="resource://org/apache/cocoon/transformation"/>
+      <catalogue id="menu" name="i18n-menu" location="resource://org/apache/cocoon/transformation"/>
+    </catalogues>
+    <cache-at-startup>true</cache-at-startup>
+   </component-instance>
+
+  </transformers>
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,77 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+
+import org.w3c.dom.Document;
+
+/**
+ *
+ *
+ * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
+ * @version CVS $Id: TraxTransformerTestCase.java 55427 2004-10-24 11:38:37Z cziegeler $
+ */
+public class TraxTransformerTestCase extends SitemapComponentTestCase {
+
+    public void testFunctionForXalan() throws Exception {
+
+        String src = "resource://org/apache/cocoon/transformation/traxtest-style.xsl";
+        Parameters parameters = new Parameters();
+        String input = "resource://org/apache/cocoon/transformation/traxtest-input.xml";
+        String result = "resource://org/apache/cocoon/transformation/traxtest-result.xml";
+
+        assertEqual(load(result), transform("xalan", src, parameters, load(input)));
+    }
+
+    public void testStressForXalan() throws Exception {
+
+        String src = "resource://org/apache/cocoon/transformation/traxtest-style.xsl";
+        Parameters parameters = new Parameters();
+        String input = "resource://org/apache/cocoon/transformation/traxtest-input.xml";
+        Document document = load(input);
+
+        for(int i=0; i<100; i++)
+          transform("xalan", src, parameters, document);
+    }
+
+    /*
+     FIXME: test doesn't run within a gump build, see
+            http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105082989401703&w=2
+
+    public void testFunctionForXSLTC() throws Exception {
+
+        String src = "resource://org/apache/cocoon/transformation/traxtest-style.xsl";
+        Parameters parameters = new Parameters();
+        String input = "resource://org/apache/cocoon/transformation/traxtest-input.xml";
+        String result = "resource://org/apache/cocoon/transformation/traxtest-result.xml";
+
+        assertEqual(load(result), transform("xsltc", src, parameters, load(input)));
+    }
+
+    public void testStressForXSLTC() throws Exception {
+
+        String src = "resource://org/apache/cocoon/transformation/traxtest-style.xsl";
+        Parameters parameters = new Parameters();
+        String input = "resource://org/apache/cocoon/transformation/traxtest-input.xml";
+        Document document = load(input);
+
+        for(int i=0; i<100; i++)
+          transform("xsltc", src, parameters, document);
+    }*/
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/TraxTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,99 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <roles>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+
+  <role name="org.apache.cocoon.transformation.TransformerSelector"
+        shorthand="transformers"
+        default-class="org.apache.cocoon.core.container.StandaloneServiceSelector"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+
+  <component-instance logger="core.xslt-processor"
+                      role="org.apache.excalibur.xml.xslt.XSLTProcessor/xsltc"
+                      class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl">
+     <parameter name="use-store" value="true"/>
+     <parameter name="incremental-processing" value="true"/>
+     <parameter name="transformer-factory" value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"/>
+  </component-instance>
+
+  <component-instance logger="core.xslt-processor"
+                      role="org.apache.excalibur.xml.xslt.XSLTProcessor/xalan"
+                      class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl">
+     <parameter name="use-store" value="true"/>
+     <parameter name="incremental-processing" value="true"/>
+     <parameter name="transformer-factory" value="org.apache.xalan.processor.TransformerFactoryImpl"/>
+  </component-instance>
+
+  <transformers logger="test">
+   <component-instance class="org.apache.cocoon.transformation.TraxTransformer" 
+                       name="xalan">
+    <use-request-parameters>false</use-request-parameters>
+    <use-session-parameters>false</use-session-parameters>
+    <use-cookie-parameters>false</use-cookie-parameters>
+    <xslt-processor-role>xalan</xslt-processor-role>
+   </component-instance>
+
+   <component-instance name="xsltc" 
+                       class="org.apache.cocoon.transformation.TraxTransformer">
+    <use-request-parameters>false</use-request-parameters>
+    <use-session-parameters>false</use-session-parameters>
+    <use-cookie-parameters>false</use-cookie-parameters>
+    <xslt-processor-role>xsltc</xslt-processor-role>
+   </component-instance>
+  </transformers>
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.cocoon.test.SitemapTestCase;
+
+public class VirtualPipelineTransformerTestCase extends SitemapTestCase {
+    public void testTransformer() throws Exception {
+        pipeTest("v1", "vpc-test.xml");
+    }
+
+    public void testInclude() throws Exception {
+        pipeTest("v2", "vpc-v2-expected.xml");
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.xconf
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.xconf?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.xconf (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.xconf Thu Nov  3 05:41:06 2005
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<cocoon version="2.2">
+
+  <include src="resource://org/apache/cocoon/cocoon.roles"/>
+
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+    <parameter name="validate" value="false"/>
+    <parameter name="namespace-prefixes" value="false"/>
+    <parameter name="stop-on-warning" value="true"/>
+    <parameter name="stop-on-recoverable-error" value="true"/>
+    <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <xslt-processor>
+     <parameter name="use-store" value="false"/>
+     <parameter name="incremental-processing" value="false"/>
+  </xslt-processor>
+
+  <component role="org.apache.excalibur.xml.xslt.XSLTProcessor/xalan"
+             class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl">
+     <parameter name="use-store" value="false"/>
+     <parameter name="incremental-processing" value="false"/>
+     <parameter name="transformer-factory" value="org.apache.xalan.processor.TransformerFactoryImpl"/>
+  </component>
+
+  <input-modules>
+    <component-instance class="org.apache.cocoon.components.modules.input.EnvironmentAttributeModule" name="environment-attr"/>
+  </input-modules>
+
+  <source-factories>
+    <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>
+    <component-instance class="org.apache.cocoon.components.source.impl.ContextSourceFactory" name="context"/>
+    <component-instance class="org.apache.cocoon.components.source.impl.ModuleSourceFactory" name="module"/>
+    <component-instance class="org.apache.cocoon.components.source.impl.XModuleSourceFactory" name="xmodule"/>
+    <component-instance class="org.apache.excalibur.source.impl.FileSourceFactory" name="file"/>
+    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
+  </source-factories>
+
+  <!-- Relative sitemap path works during sitemap execution but
+       give exceptions during decommissioning -->
+  <sitemap file="resource://org/apache/cocoon/transformation/vpc-sitemap.xmap"/>
+
+</cocoon>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/VirtualPipelineTransformerTestCase.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XAbstractDOMTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XAbstractDOMTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XAbstractDOMTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XAbstractDOMTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,81 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.apache.cocoon.xml.AttributesImpl;
+import org.apache.cocoon.xml.dom.DOMBuilder;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.Attributes;
+
+/**
+ * A simple testcase for AbstractDOMTransformer.
+ *
+ * @version CVS $Id: XAbstractDOMTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class XAbstractDOMTransformerTestCase extends TestCase {
+
+    /**
+     * Test if sending two consecutive "characters" events to the transformer
+     * doesn't lose one of them (cfr. bug #26219).
+     */
+    public void testJoiningCharacters() throws Exception {
+        /*
+         * Simple transformer that produces a document with a root with a single
+         * text node whose value is given by the concatenation of the values
+         * of the children of the root element of the original document.
+         */
+        AbstractDOMTransformer adt = new AbstractDOMTransformer() {
+            protected Document transform(Document doc) {
+                try {
+                    Document newdoc = DocumentBuilderFactory
+                            .newInstance().newDocumentBuilder().newDocument();
+                    Element root = newdoc.createElement("out");
+                    newdoc.appendChild(root);
+                    NodeList children = doc.getDocumentElement().getChildNodes();
+                    StringBuffer value = new StringBuffer();
+                    for (int i = 0 ; i < children.getLength() ; ++i) {
+                        value.append(children.item(i).getNodeValue());
+                    }
+                    root.appendChild(newdoc.createTextNode(value.toString()));
+                    return newdoc;
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    return null;
+                }
+            }
+        };
+        DOMBuilder builder = new DOMBuilder();
+        adt.setConsumer(builder);
+        Attributes attrs = new AttributesImpl();
+        char c1[] = "ABC".toCharArray();
+        char c2[] = "DEF".toCharArray();
+        adt.startDocument();
+        adt.startElement("", "in", "in", attrs);
+        adt.characters(c1, 0, 3);
+        adt.characters(c2, 0, 3);
+        adt.endElement("", "in", "in");
+        adt.endDocument();
+        assertEquals("Content of root element not what expected", "ABCDEF", 
+                builder.getDocument().getDocumentElement().getFirstChild().getNodeValue());
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XAbstractDOMTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,73 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.transformation;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+
+/**
+ * A simple testcase for FilterTransformer.
+ *
+ * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
+ * @version CVS $Id: XIncludeTransformerTestCase.java 55517 2004-10-25 17:54:51Z cziegeler $
+ */
+public class XIncludeTransformerTestCase extends SitemapComponentTestCase {
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.SitemapComponentTestCase#getSitemapComponentInfo()
+     */
+    protected String[] getSitemapComponentInfo() {
+        return new String[] {Transformer.class.getName(),
+                             XIncludeTransformer.class.getName(),
+                             "xinclude"};
+    }
+    
+    /** Testcase for xinclude simple include
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testXInclude1() throws Exception {
+        getLogger().debug("testXInclude1");
+        
+        Parameters parameters = new Parameters();
+        
+        String input = "resource://org/apache/cocoon/transformation/xinclude-input-1.xml";
+        String result = "resource://org/apache/cocoon/transformation/xinclude-result-1.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("xinclude", src, parameters, load(input)));
+    }
+
+    /** Testcase for xinclude simple text include
+     *
+     * @throws Exception if ServiceManager enterEnvironment fails
+     */
+    public void testXInclude2() throws Exception {
+        getLogger().debug("testXInclude2");
+        
+        Parameters parameters = new Parameters();
+        
+        String input = "resource://org/apache/cocoon/transformation/xinclude-input-2.xml";
+        String result = "resource://org/apache/cocoon/transformation/xinclude-result-2.xml";
+        String src =  null;
+        
+        assertEqual( load(result),
+        transform("xinclude", src, parameters, load(input)));
+    }
+    
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/XIncludeTransformerTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,73 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<testcase>
+ <context>
+   <entry name="root-url" value="/"/>
+ </context>
+
+ <roles>
+  <role name="org.apache.excalibur.xml.dom.DOMParser"
+        shorthand="dom-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+  <role name="org.apache.excalibur.xml.sax.SAXParser"
+        shorthand="xml-parser"
+        default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
+
+  <role name="org.apache.excalibur.xmlizer.XMLizer"
+        shorthand="xmlizer"
+        default-class="org.apache.excalibur.xmlizer.DefaultXMLizer"/>
+
+  <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
+        shorthand="xslt-processor"
+        default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
+        
+  <role name="org.apache.excalibur.xml.xpath.XPathProcessor"
+        shorthand="xpath-processor"
+        default-class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"/>
+
+  <role name="org.apache.excalibur.store.Store/TransientStore"
+        shorthand="transient-store"
+        default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+
+  <role name="org.apache.excalibur.store.Store"
+       shorthand="persistent-store"
+       default-class="org.apache.excalibur.store.impl.MemoryStore"/>
+ </roles>
+
+ <components>
+  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser">
+   <parameter name="validate" value="false"/>
+   <parameter name="namespace-prefixes" value="false"/>
+   <parameter name="stop-on-warning" value="true"/>
+   <parameter name="stop-on-recoverable-error" value="true"/>
+   <parameter name="reuse-parsers" value="false"/>
+  </xml-parser>
+
+  <xmlizer/>
+
+  <transient-store/>
+
+  <persistent-store/>
+
+  <xslt-processor logger="core.xslt-processor">
+   <parameter name="use-store" value="true"/>
+   <parameter name="incremental-processing" value="true"/>
+  </xslt-processor>
+
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-input-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-input-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-input-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-input-1.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" ?>
+
+<root>
+  <x>X</x>
+  <a>A</a>
+  <a b="c">d</a>
+  <a href="x">x</a>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-input-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-result-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-result-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-result-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-result-1.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" ?>
+
+<root>
+  <x>X</x>
+  <a>A</a>
+  <a b="c">d</a>
+  <a href="http://nullnull/portal1/sect1/x">x</a>
+</root>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/augment-result-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-incl.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-incl.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-incl.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-incl.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root-include>
+  <p>include 1</p>
+  <p>include 2</p>
+  <p>include 3</p>
+  <p>include 4</p>
+</root-include>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-incl.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-1.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root
+  xmlns:ci="http://apache.org/cocoon/include/1.0">
+  <p>P1</p>
+  <p>P2</p>
+
+<ci:include src="resource://org/apache/cocoon/transformation/cinclude-incl.xml"
+/>
+
+  <p>P3</p>
+  <p>P4</p>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-2.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,29 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root
+  xmlns:ci="http://apache.org/cocoon/include/1.0">
+  <p>P1</p>
+  <p>P2</p>
+
+<ci:include src="resource://org/apache/cocoon/transformation/cinclude-incl.xml"
+element="inc-root"
+/>
+
+  <p>P3</p>
+  <p>P4</p>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-3.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-3.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-3.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-3.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,29 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root
+  xmlns:ci="http://apache.org/cocoon/include/1.0">
+  <p>P1</p>
+  <p>P2</p>
+
+<ci:include src="resource://org/apache/cocoon/transformation/cinclude-incl.xml"
+element="inc-root"
+select="root-include/p[3]"
+/>
+  <p>P3</p>
+  <p>P4</p>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-input-3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-1.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root
+  xmlns:ci="http://apache.org/cocoon/include/1.0">
+  <p>P1</p>
+  <p>P2</p>
+
+<root-include>
+  <p>include 1</p>
+  <p>include 2</p>
+  <p>include 3</p>
+  <p>include 4</p>
+</root-include>
+
+  <p>P3</p>
+  <p>P4</p>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-2.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root
+  xmlns:inc="incl-ns"
+>
+  <p>P1</p>
+  <p>P2</p>
+
+<inc-root>
+<root-include>
+  <p>include 1</p>
+  <p>include 2</p>
+  <p>include 3</p>
+  <p>include 4</p>
+</root-include>
+</inc-root>
+
+  <p>P3</p>
+  <p>P4</p>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-3.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-3.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-3.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-3.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<root
+  xmlns:inc="incl-ns"
+>
+  <p>P1</p>
+  <p>P2</p>
+
+<inc-root>
+  <p>include 3</p>
+</inc-root>
+
+  <p>P3</p>
+  <p>P4</p>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/cinclude-result-3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-1.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" ?>
+
+<root>
+  <x>X</x>
+  <a>A</a>
+  <a b="c">d</a>
+  <a href="x">x</a>
+</root>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message