cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jheym...@apache.org
Subject svn commit: r330548 [78/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/selection/SessionAttributeSelectorTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.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.selection;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+import org.apache.cocoon.environment.Session;
+
+public class SessionAttributeSelectorTestCase extends SitemapComponentTestCase {
+
+    /**
+     * Run this test suite from commandline
+     *
+     * @param args commandline arguments (ignored)
+     */
+    public static void main( String[] args ) {
+        TestRunner.run(suite());
+    }
+    
+    /** Create a test suite.
+     * This test suite contains all test cases of this class.
+     * @return the Test object containing all test cases.
+     */
+    public static Test suite() {
+        TestSuite suite = new TestSuite(SessionAttributeSelectorTestCase.class);
+        return suite;
+    }
+    
+    /**
+     * A session-attribute select test
+     */
+    public void testSessionAttributeSelect() throws Exception {
+        final String attributeName = "sessionAttributeSelector";
+        final String attributeValue = "sessionAttributeSelectorValue";
+        
+        Session session = getRequest().getSession(true);
+        session.setAttribute( attributeName, attributeValue );        
+        Parameters parameters = new Parameters();
+        boolean result;
+        
+        // test selection success
+        result = this.select( "session-attribute", attributeValue, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a session attribtue is selected", result );
+        
+        // test selection failure
+        result = this.select( "session-attribute", "unknownValue", parameters );
+        System.out.println( result );
+        assertTrue( "Test if a session attribute is not selected", !result );
+    }
+
+    /**
+     * A session-attribute select test
+     */
+    public void testSessionAttributeSelectOverridden() throws Exception {
+        final String attributeName = "sessionAttributeSelector1";
+        final String attributeValue = "sessionAttributeSelectorValue1";
+        Session session = getRequest().getSession(true);
+        session.setAttribute( attributeName, attributeValue );        
+        
+        final String attributeNameOverridden = "sessionAttributeSelector";
+        final String attributeValueOverridden = "sessionAttributeSelectorValue";
+        session.setAttribute( attributeNameOverridden, attributeValueOverridden );
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "attribute-name", attributeName );
+        boolean result;
+        
+        // test selection success
+        result = this.select( "session-attribute", attributeValue, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a requst attribtue is selected", result );
+        
+        // test selection failure
+        result = this.select( "session-attribute", attributeValueOverridden, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a session attribute is not selected", !result );
+    }
+    
+    /**
+     * A session-attribute select test
+     */
+    public void testSessionAttributeSelectMissingSession() throws Exception {
+        final String attributeValue = "sessionAttributeSelectorValue";
+
+        // test w/o session
+        getRequest().clearSession();
+        
+        Parameters parameters = new Parameters();
+        boolean result;
+        
+        // test selection fails
+        result = this.select( "session-attribute", attributeValue, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a session attribtue is not selected", !result );
+    }
+}

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.xtest Thu Nov  3 05:41:06 2005
@@ -0,0 +1,33 @@
+<?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.cocoon.selection.SelectorSelector"
+        shorthand="selectors"
+        default-class="org.apache.cocoon.core.container.StandaloneServiceSelector"/>
+ </roles>
+
+ <components>
+  <selectors logger="test">
+   <component-instance class="org.apache.cocoon.selection.SessionAttributeSelector" 
+                       name="session-attribute">
+      <attribute-name>sessionAttributeSelector</attribute-name>
+    </component-instance>
+  </selectors>
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,86 @@
+/*
+* 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.selection;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.SitemapComponentTestCase;
+
+
+public class SimpleSelectorTestCase extends SitemapComponentTestCase {
+
+    /**
+     * Run this test suite from commandline
+     *
+     * @param args commandline arguments (ignored)
+     */
+    public static void main( String[] args ) {
+        TestRunner.run(suite());
+    }
+    
+    /** Create a test suite.
+     * This test suite contains all test cases of this class.
+     * @return the Test object containing all test cases.
+     */
+    public static Test suite() {
+        TestSuite suite = new TestSuite(SimpleSelectorTestCase.class);
+        return suite;
+    }
+    
+    /**
+     * A simple parameter select test
+     */
+    public void testSimpleSelect() throws Exception {
+        final String value = "simpleSelectorTestCase";
+        
+        Parameters parameters = new Parameters();
+        parameters.setParameter( "value", value );
+        boolean result;
+        
+        // test selection success
+        result = this.select( "simple", value, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a parameter is selected", result );
+        
+        // test selection failure
+        result = this.select( "simple", "unknownValue", parameters );
+        System.out.println( result );
+        assertTrue( "Test if a parameter is not selected", !result );
+    }
+
+    /**
+     * A simple parameter select test
+     */
+    public void testParameterSelectUndefined() throws Exception {
+        final String value = "valueSelectorTestCase";
+        
+        Parameters parameters = new Parameters();
+        boolean result;
+        
+        // test selection fails
+        result = this.select( "simple", value, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a parameter is not selected", !result );
+
+        parameters.setParameter( "value", "some-value" );
+        // test selection fails
+        result = this.select( "simple", value, parameters );
+        System.out.println( result );
+        assertTrue( "Test if a parameter is not selected", !result );
+    }
+}

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.xtest?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.xtest (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/selection/SimpleSelectorTestCase.xtest 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.
+-->
+<testcase>
+ <roles>
+  <role name="org.apache.cocoon.selection.SelectorSelector"
+        shorthand="selectors"
+        default-class="org.apache.cocoon.core.container.StandaloneServiceSelector"/>
+ </roles>
+
+ <components>
+  <selectors logger="test">
+   <component-instance class="org.apache.cocoon.selection.SimpleSelector" 
+                       name="simple">
+    </component-instance>
+  </selectors>
+ </components>
+
+</testcase>

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.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.serialization;
+
+import org.apache.cocoon.test.SitemapTestCase;
+
+public class VirtualPipelineSerializerTestCase extends SitemapTestCase {
+    public void testSerializer() 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/serialization/VirtualPipelineSerializerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.xconf
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.xconf?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.xconf (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/VirtualPipelineSerializerTestCase.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/serialization/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/serialization/VirtualPipelineSerializerTestCase.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-include.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-include.xsl?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-include.xsl (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-include.xsl Thu Nov  3 05:41:06 2005
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:param name="file"/>
+
+  <xsl:template match="/test">
+    <test-out file="{$file}">
+      <xsl:copy-of select="document($file)"/>
+    </test-out>
+  </xsl:template>
+
+</xsl:stylesheet>

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <map:generators default="file">
+      <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+    </map:generators>
+
+    <map:transformers default="xslt">
+      <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
+        <xslt-processor-role>xalan</xslt-processor-role>
+      </map:transformer>
+    </map:transformers>
+
+    <map:serializers default="xml">
+      <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+      <map:serializer name="virtual1" src="org.apache.cocoon.serialization.VirtualPipelineSerializer">
+        <map:serialize type="xml"/>
+      </map:serializer>
+      <map:serializer name="virtual2" src="org.apache.cocoon.serialization.VirtualPipelineSerializer">
+        <map:transform src="vpc-include.xsl">
+           <map:parameter name="file" value="{src}"/>
+        </map:transform>
+        <map:serialize type="xml"/>
+      </map:serializer>
+    </map:serializers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+    </map:matchers>
+
+    <map:pipes default="noncaching">
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+      </map:pipe>
+    </map:pipes>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="v1">
+        <map:generate src="vpc-test.xml"/>
+        <map:serialize type="virtual1"/>
+      </map:match>
+
+      <map:match pattern="v2">
+        <map:generate src="vpc-test.xml"/>
+        <map:serialize type="virtual2" src="vpc-test2.xml"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test/>
\ No newline at end of file

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-test2.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test2/>
\ No newline at end of file

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-v2-expected.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-v2-expected.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-v2-expected.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-v2-expected.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test-out file="module:environment-attr:env-prefix-serializer-source-map-virtual2#src"><test2/></test-out>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/serialization/vpc-v2-expected.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/SitemapTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/SitemapTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/SitemapTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/SitemapTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,213 @@
+/*
+ * 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;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.Cocoon;
+import org.apache.cocoon.core.BootstrapEnvironment;
+import org.apache.cocoon.core.CoreUtil;
+import org.apache.cocoon.test.core.TestBootstrapEnvironment;
+import org.apache.cocoon.test.core.TestCoreUtil;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.mock.MockContext;
+import org.apache.cocoon.environment.mock.MockEnvironment;
+import org.apache.cocoon.environment.mock.MockRequest;
+import org.apache.cocoon.environment.mock.MockResponse;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceResolver;
+
+public class SitemapTestCase extends TestCase {
+
+    private MockRequest request = new MockRequest();
+    private MockResponse response = new MockResponse();
+    private MockContext environmentContext = new MockContext();
+    private Map objectmodel = new HashMap();
+
+    private Logger logger;
+    private CoreUtil coreUtil;
+    private Cocoon cocoon;
+    private String classDir;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        String level = System.getProperty("junit.test.loglevel", "" + ConsoleLogger.LEVEL_DEBUG);
+        this.logger = new ConsoleLogger(Integer.parseInt(level));
+
+        objectmodel.clear();
+
+        request.reset();
+        objectmodel.put(ObjectModelHelper.REQUEST_OBJECT, request);
+
+        response.reset();
+        objectmodel.put(ObjectModelHelper.RESPONSE_OBJECT, response);
+
+        environmentContext.reset();
+        objectmodel.put(ObjectModelHelper.CONTEXT_OBJECT, environmentContext);
+
+        String className = this.getClass().getName();
+        this.classDir = this.getClassDirURL().toExternalForm();
+        BootstrapEnvironment env = 
+            new TestBootstrapEnvironment(className.substring(className.lastIndexOf('.') + 1) + ".xconf",
+                                         this.classDir,
+                                         environmentContext,
+                                         this.logger);
+
+        this.coreUtil = new TestCoreUtil(env);
+        this.cocoon = this.coreUtil.createCocoon();
+    }
+
+    protected void tearDown() throws Exception {
+        this.coreUtil.destroy();
+        super.tearDown();
+    }
+
+    /** Return the logger */
+    protected Logger getLogger() {
+        return this.logger;
+    }
+    
+    protected final Object lookup( final String key ) throws ServiceException {
+        return this.cocoon.getServiceManager().lookup( key );
+    }
+
+    protected final void release( final Object object ) {
+        this.cocoon.getServiceManager().release( object );
+    }
+    
+    /**
+     * Utility method for geting the URL to the directory that this class is in
+     */
+    protected URL getClassDirURL() throws RuntimeException {
+        String className = getClass().getName().replace( '.', '/' ) + ".class";
+        String classURL = null;
+        String classDir = null;
+        try {
+            classURL =
+                getClass().getClassLoader().getResource( className ).toExternalForm();
+            getLogger().debug("classURL=" + classURL);
+            classDir = classURL.substring(0, classURL.lastIndexOf('/') + 1);
+            getLogger().debug("classDir=" + classDir);
+            return new URL(classDir);
+        } catch (SecurityException e) {
+            throw new RuntimeException("Not allowed to access classloader for " + className, e);
+        } catch (MalformedURLException e) {
+            throw new RuntimeException("Malformed URL for className=" + className +
+                                       " classURL=" + classURL + " classDir=" + classDir, e);
+        } catch (Exception e) {
+            throw new RuntimeException("Couldn't create URL for " + className, e);
+        }
+    }
+
+    /**
+     * Load a binary document.
+     *
+     * @param source Source location.
+     *
+     * @return Binary data.
+     */
+    public final byte[] loadByteArray(String source) {
+
+        SourceResolver resolver = null;
+        Source assertionsource = null;
+        byte[] assertiondocument = null;
+
+        try {
+            resolver = this.cocoon.getSourceResolver();
+            assertNotNull("Test lookup of source resolver", resolver);
+
+            assertionsource = resolver.resolveURI(source);
+            assertNotNull("Test lookup of assertion source", assertionsource);
+            assertTrue("Test if source exist", assertionsource.exists());
+
+            assertNotNull("Test if inputstream of the assertion source is not null",
+                          assertionsource.getInputStream());
+
+            InputStream input = assertionsource.getInputStream();
+
+            Vector document = new Vector();
+            int i = 0;
+            int c;
+
+            while ((c = input.read())!=-1) {
+                document.add(new Byte((byte) c)); 
+                i++;
+            }
+            assertiondocument = new byte[document.size()];
+            for (i = 0; i < document.size(); i++) {
+                assertiondocument[i] = ((Byte)document.get(i)).byteValue();
+            }
+
+        } catch (Exception e) {
+            getLogger().error("Could not execute test", e);
+            fail("Could not execute test: "+e);
+        }
+
+        return assertiondocument;
+    }
+
+    /**
+     * Assert that the result of a byte comparison is identical.
+     *
+     * @param expected The expected byte array
+     * @param actual The actual byte array
+     */
+    public final void assertIdentical(byte[] expected, byte[] actual) {
+        assertEquals("Byte arrays of differing sizes, ", expected.length,
+                     actual.length);
+
+        if (expected.length>0) {
+            for (int i = 0; i<expected.length; i++) {
+                assertEquals("Byte array differs at index "+i, expected[i],
+                             actual[i]);
+            }
+        }
+
+    }
+
+    protected MockEnvironment getEnvironment(String uri) {
+        MockEnvironment env = new MockEnvironment();
+        env.setURI("", uri);
+        this.request.setEnvironment(env);
+        env.setObjectModel(this.objectmodel);
+
+        return env;
+    }
+
+    protected byte[] process(String uri) throws Exception {
+        MockEnvironment env = getEnvironment(uri);
+        this.cocoon.process(env);
+        getLogger().info("Output: " + new String(env.getOutput(), "UTF-8"));
+
+        return env.getOutput();
+    }
+
+    protected void pipeTest(String uri, String expectedSource) throws Exception {
+        byte[] expected = loadByteArray(this.classDir + expectedSource);
+        byte[] actual = process(uri);
+        assertIdentical(expected, actual);
+    }
+}

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,36 @@
+/*
+ * 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.components.blocks;
+
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.test.SitemapTestCase;
+import org.apache.cocoon.components.blocks.BlockManager;
+import org.apache.cocoon.environment.mock.MockEnvironment;
+
+public class BlockManagerTestCase extends SitemapTestCase {
+    public void testCreate() throws ServiceException {
+        BlockManager block = (BlockManager)this.lookup(BlockManager.ROLE);
+        this.release(block);
+    }
+
+    public void testPipeline() throws Exception {
+        BlockManager block = (BlockManager)this.lookup(BlockManager.ROLE);
+        MockEnvironment env = getEnvironment("test");
+        block.process(env);
+        getLogger().info("Output: " + new String(env.getOutput(), "UTF-8"));
+        this.release(block);
+    }
+}

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.xconf
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.xconf?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.xconf (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlockManagerTestCase.xconf Thu Nov  3 05:41:06 2005
@@ -0,0 +1,55 @@
+<?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/>
+
+  <source-resolver/>
+
+  <fam/>
+
+  <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.excalibur.source.impl.FileSourceFactory" name="file"/>
+    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
+  </source-factories>
+
+  <component role="org.apache.cocoon.components.blocks.BlockManager"
+             class="org.apache.cocoon.components.blocks.BlockManager"
+             id="test1id" location="test1/">
+    <mount path="/test1/"/>
+    <connections>
+      <connection name="test2" block="test2id"/>
+    </connections>
+    <properties>
+      <property name="foo" value="bar"/>
+    </properties>
+  </component>
+
+</cocoon>

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,97 @@
+/*
+ * 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.components.blocks;
+
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.components.blocks.BlocksManager;
+import org.apache.cocoon.test.SitemapTestCase;
+import org.apache.cocoon.environment.mock.MockEnvironment;
+
+public class BlocksManagerTestCase extends SitemapTestCase {
+
+    public void testCreate() throws ServiceException {
+        BlocksManager blocks = (BlocksManager)this.lookup(BlocksManager.ROLE);
+        this.release(blocks);
+    }
+
+    public void testMount() throws Exception {
+        BlocksManager blocks = (BlocksManager)this.lookup(BlocksManager.ROLE);
+        MockEnvironment env = getEnvironment("/test1/test");
+        blocks.process(env);
+        getLogger().info("Output: " + new String(env.getOutput(), "UTF-8"));
+        this.release(blocks);
+    }
+
+    public void testBlockId() throws Exception {
+        BlocksManager blocks = (BlocksManager)this.lookup(BlocksManager.ROLE);
+        MockEnvironment env = getEnvironment("test");
+        blocks.getBlock("test1id").process(env);
+        getLogger().info("Output: " + new String(env.getOutput(), "UTF-8"));
+        this.release(blocks);
+    }
+
+    public void testBlockSource1() throws Exception {
+        pipeTest("test", "test1/test.xml");
+    }
+
+    public void testBlockSource2() throws Exception {
+        pipeTest("test2", "test2/test.xml");
+    }
+
+    public void testBlockSource3() throws Exception {
+        pipeTest("test3", "test1/test.xml");
+    }
+    /*
+    public void testBlockSource4() throws Exception {
+        pipeTest("test4", "test1/COB-INF/classes/test.xml");
+    }
+    */
+    public void testBlockSourceSub1() throws Exception {
+        pipeTest("sub/test", "test1/sub/test.xml");
+    }
+
+    public void testBlockSourceSub2() throws Exception {
+        pipeTest("sub/test2", "test1/sub/test.xml");
+    }
+
+    public void testBlockSourceSub3() throws Exception {
+        pipeTest("sub/test3", "test1/test.xml");
+    }
+
+    public void testBlockExtend1() throws Exception {
+        pipeTest("ext/test", "test3/test.xml");
+    }
+
+    public void testBlockExtend2() throws Exception {
+        pipeTest("ext/test2", "test2/test.xml");
+    }
+
+    public void testBlockExtend3() throws Exception {
+        pipeTest("ext/test3", "test3/test.xml");
+    }
+
+    public void testBlockExtend4() throws Exception {
+        pipeTest("ext/test4", "test1/test.xml");
+    }
+
+    public void testBlockProperty() throws Exception {
+        pipeTest("ext/prop", "test3/prop-expected.xml");
+    }
+
+    public void testAbsolutize() throws Exception {
+        pipeTest("sub/abs", "test1/sub/path-expected.xml");
+    }
+}

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.xconf
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.xconf?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.xconf (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/BlocksManagerTestCase.xconf Thu Nov  3 05:41:06 2005
@@ -0,0 +1,50 @@
+<?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/>
+
+  <source-resolver/>
+
+  <fam/>
+
+  <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.excalibur.source.impl.FileSourceFactory" name="file"/>
+    <component-instance class="org.apache.cocoon.components.source.impl.BlocksSourceFactory" name="blocks"/>
+    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
+  </source-factories>
+
+  <component role="org.apache.cocoon.components.blocks.BlocksManager"
+             class="org.apache.cocoon.components.blocks.BlocksManager"
+             file="wiring.xml"/>
+
+  <sitemap file="blocks-sitemap.xmap"/>
+
+</cocoon>

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/blocks-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/blocks-sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/blocks-sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/blocks-sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <map:readers default="resource">
+      <map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
+    </map:readers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+    </map:matchers>
+
+    <map:pipes default="noncaching">
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+      </map:pipe>
+    </map:pipes>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="ext/**">
+        <map:read src="blocks:/test3/{1}"/>
+      </map:match>
+
+      <map:match pattern="**">
+        <map:read src="blocks:/test1/{1}"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/block.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/block.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/block.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/anyblock/1.0">
+  <name>anyblock</name>
+  <description href="http://cocoon.apache.org/blocks/anyblock/1.0">
+    A test block
+  </description>
+  <state href="http://cocoon.apache.org/blocks/anyblock/1.0/state.html" 
+         community="committed" 
+         interfaces="unstable" 
+         implementation="stable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <components>
+    <include src="COB-INF/xconf/test1.xconf"/>
+  </components>
+  <sitemap src="block-sitemap.xmap"/>
+  <properties>
+    <property name="foo">
+      <default>baz</default>
+      <description>A test property</description>
+    </property>
+  </properties>
+  <requirements>
+    <requires interface="http://cocoon.apache.org/blocks/another-interface/1.0"
+              name="test2"
+              default="http://cocoon.apache.org/blocks/another-block/1.0"/>
+  </requirements>
+</block>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/block.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/classes/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/classes/test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/classes/test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/classes/test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><local-classloader/>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/classes/test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/xconf/test1.xconf
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/xconf/test1.xconf?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/xconf/test1.xconf (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/xconf/test1.xconf Thu Nov  3 05:41:06 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id: test1.xconf 326924 2005-10-20 15:13:32Z danielf $ -->
+
+<map:components xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <source-factories>
+    <component-instance name="block" class="org.apache.cocoon.components.source.impl.BlockSourceFactory"/>
+  </source-factories>
+
+  <input-modules>
+    <component-instance name="block-path" class="org.apache.cocoon.components.modules.input.BlockPathModule" />
+  </input-modules>
+
+  <map:generators default="file">
+    <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+  </map:generators>
+
+  <map:transformers default="xslt">
+    <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
+  </map:transformers>
+
+  <map:serializers default="xml">
+    <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer" />
+  </map:serializers>
+
+  <map:matchers default="wildcard">
+    <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+  </map:matchers>
+
+  <map:pipes default="noncaching">
+    <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
+  </map:pipes>
+</map:components>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/COB-INF/xconf/test1.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/block-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/block-sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/block-sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/block-sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id:$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <!--map:classpath>
+      <class-dir src="COB-INF/classes"/>
+    </map:classpath-->
+    <map:generators default="file"/>
+    <map:transformers default="xslt"/>
+    <map:serializers default="xml">
+      <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+    </map:serializers>
+    <map:matchers default="wildcard"/>
+    <map:pipes default="noncaching"/>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="test">
+        <map:generate src="test.xml"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="test2">
+        <map:generate src="block:test2:/test"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="test3">
+        <map:generate src="block:/test"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="test4">
+        <map:generate src="resource://test.xml"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="sub/**">
+        <map:mount uri-prefix="sub" src="sub/"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/block-sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/block-paths.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/block-paths.xsl?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/block-paths.xsl (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/block-paths.xsl Thu Nov  3 05:41:06 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id:$ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:param name="abs"/>
+  <xsl:param name="rel"/>
+  <xsl:param name="other"/>
+
+  <xsl:template match="/">
+    <properties abs="{$abs}" rel="{$rel}" other="{$other}"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/block-paths.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/path-expected.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/path-expected.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/path-expected.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/path-expected.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><properties other="/test2/test" rel="/test1/sub/test" abs="/test1/test"/>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/path-expected.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="test">
+        <map:generate src="test.xml"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="test2">
+        <map:generate src="block:./test"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="test3">
+        <map:generate src="block:/test"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="abs">
+        <map:generate src="test.xml"/>
+        <map:transform src="block-paths.xsl">
+          <map:parameter name="abs" value="{block-path:/test}"/>
+          <map:parameter name="rel" value="{block-path:./test}"/>
+          <map:parameter name="other" value="{block-path:test2:/test}"/>
+        </map:transform>
+        <map:serialize/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><sub/>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/sub/test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test1/test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test/>
\ No newline at end of file

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/COB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/COB-INF/block.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/COB-INF/block.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/COB-INF/block.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/anyblock2/1.0">
+  <name>anyblock2</name>
+  <description href="http://cocoon.apache.org/blocks/anyblock2/1.0">
+    Another test block
+  </description>
+  <state href="http://cocoon.apache.org/blocks/anyblock/1.0/state.html" 
+         community="committed" 
+         interfaces="unstable" 
+         implementation="stable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <sitemap src="block-sitemap.xmap"/>
+</block>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/COB-INF/block.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/block-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/block-sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/block-sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/block-sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id:$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <map:generators default="file">
+      <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+    </map:generators>
+
+    <map:transformers default="xslt">
+      <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
+    </map:transformers>
+
+    <map:serializers default="xml">
+      <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+    </map:serializers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+    </map:matchers>
+
+    <map:pipes default="noncaching">
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+      </map:pipe>
+    </map:pipes>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="test">
+        <map:generate src="test.xml"/>
+        <map:serialize/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/block-sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test2/test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test2/>
\ No newline at end of file

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/COB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/COB-INF/block.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/COB-INF/block.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/COB-INF/block.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/extendedblock/1.0">
+  <name>extendedblock</name>
+  <description href="http://cocoon.apache.org/blocks/extendedblock/1.0">
+    An extended test block
+  </description>
+  <state href="http://cocoon.apache.org/blocks/extendedblock/1.0/state.html" 
+         community="committed" 
+         interfaces="unstable" 
+         implementation="stable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <sitemap src="block-sitemap.xmap"/>
+  <properties>
+    <property name="bar">
+      <default>gazonk</default>
+      <description>Another test property</description>
+    </property>
+    <property name="baz">
+      <description>Still another test property</description>
+    </property>
+  </properties>
+  <extends block="http://cocoon.apache.org/blocks/anyblock/1.0"/>
+</block>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/COB-INF/block.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-properties.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-properties.xsl?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-properties.xsl (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-properties.xsl Thu Nov  3 05:41:06 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id:$ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:param name="foo"/>
+  <xsl:param name="bar"/>
+  <xsl:param name="baz"/>
+
+  <xsl:template match="/">
+    <properties foo="{$foo}" bar="{$bar}" baz="{$baz}"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-properties.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- SVN $Id:$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+
+    <source-factories>
+      <component-instance class="org.apache.cocoon.components.source.impl.BlockSourceFactory" name="block"/>
+    </source-factories>
+
+    <input-modules>
+      <component-instance name="block-property"  class="org.apache.cocoon.components.modules.input.BlockPropertyModule"/>
+    </input-modules>
+
+    <map:generators default="file">
+      <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+    </map:generators>
+
+    <map:transformers default="xslt">
+      <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
+    </map:transformers>
+
+    <map:serializers default="xml">
+      <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+    </map:serializers>
+
+    <map:readers default="resource">
+      <map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
+    </map:readers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+    </map:matchers>
+
+    <map:pipes default="noncaching">
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+      </map:pipe>
+    </map:pipes>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="test">
+        <map:generate src="test.xml"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="test4">
+        <map:generate src="block:super:/test"/>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="prop">
+        <map:generate src="test.xml"/>
+        <map:transform src="block-properties.xsl">
+          <map:parameter name="foo" value="{block-property:foo}"/>
+          <map:parameter name="bar" value="{block-property:bar}"/>
+          <map:parameter name="baz" value="{block-property:baz}"/>
+        </map:transform>
+        <map:serialize/>
+      </map:match>
+
+      <map:match pattern="**">
+        <map:read src="block:super:/{1}"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/block-sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/prop-expected.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/prop-expected.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/prop-expected.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/prop-expected.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><properties baz="blah" bar="gazonk" foo="bar"/>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/prop-expected.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/test3/test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test3/>
\ No newline at end of file

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

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/wiring.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/wiring.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/wiring.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/test/components/blocks/wiring.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,45 @@
+<!--
+  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. 
+-->
+<wiring xmlns="http://apache.org/cocoon/blocks/wiring/1.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:schemaLocation="http://apache.org/cocoon/blocks/wiring/1.0 wiring-schema-1.0.xsd"
+>
+
+  <block id="test1id" location="test1/">
+    <mount path="/test1/"/>
+    <connections>
+      <connection name="test2" block="test2id"/>
+    </connections>
+    <properties>
+      <property name="foo" value="bar"/>
+    </properties>
+  </block>
+
+  <block id="test2id" location="test2/">
+    <mount path="/test2/"/>
+  </block>
+
+  <block id="test3id" location="test3/">
+    <mount path="/test3/"/>
+    <connections>
+      <connection name="super" block="test1id"/>
+    </connections>
+    <properties>
+      <property name="baz" value="blah"/>
+    </properties>
+  </block>
+
+</wiring>
\ No newline at end of file

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



Mime
View raw message