You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by da...@apache.org on 2006/10/07 17:32:21 UTC

svn commit: r453933 - in /cocoon/trunk/core: cocoon-blocks-fw/ cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/ cocoon-blocks-fw/cocoon-blocks-fw-impl/ cocoon-blocks-fw/cocoon-blocks-fw-sample/ cocoon-blocks-fw/coco...

Author: danielf
Date: Sat Oct  7 08:32:19 2006
New Revision: 453933

URL: http://svn.apache.org/viewvc?view=rev&rev=453933
Log:
Modified the cocoon-blocks-fw-sample, so that it works with the new blocks fw and made it available in the cocoon-webapp.
Made the DemoServlet use the block protocol.

Added:
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sitemap.xmap
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/block-paths.xsl
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/path-expected.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/sitemap.xmap
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/test.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/test.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/sitemap.xmap
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/test.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/block-properties.xsl
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/prop-expected.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/sitemap.xmap
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/test.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet1.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet2.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet3.xml
Modified:
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/DemoServlet.java
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/pom.xml
    cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/pom.xml
    cocoon/trunk/core/cocoon-blocks-fw/pom.xml
    cocoon/trunk/core/cocoon-webapp/pom.xml

Modified: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/DemoServlet.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/DemoServlet.java?view=diff&rev=453933&r1=453932&r2=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/DemoServlet.java (original)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-demo1/src/main/java/org/apache/cocoon/blocks/demo1/DemoServlet.java Sat Oct  7 08:32:19 2006
@@ -20,8 +20,6 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintWriter;
-import java.net.URL;
-import java.net.URLConnection;
 
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletException;
@@ -29,11 +27,28 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceResolver;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
 /**
  * @version $Id: TestServlet2.java 388756 2006-03-25 13:43:42Z danielf $
  */
 public class DemoServlet extends HttpServlet {
 
+    BeanFactory beanFactory;
+    SourceResolver resolver;
+    
+    /* (non-Javadoc)
+     * @see javax.servlet.GenericServlet#init()
+     */
+    public void init() throws ServletException {
+        this.beanFactory =
+            WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());
+        this.resolver = (SourceResolver) this.beanFactory.getBean(SourceResolver.ROLE);
+    }
+
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         String path = request.getPathInfo();
         
@@ -47,11 +62,8 @@
             RequestDispatcher demo2 = this.getServletContext().getNamedDispatcher("demo2");
             demo2.forward(request, response);
         } else if ("/test3".equals(path)) {
-            throw new ServletException("Unknown path " + path);
-            /* TODO: implement the block protocol for the Spring context
-            URL url = new URL("block:/test1");
-            URLConnection conn = url.openConnection();
-            InputStream is = conn.getInputStream();
+            Source source = this.resolver.resolveURI("block:/test1");
+            InputStream is = source.getInputStream();
 
             response.setContentType("text/plain");
             OutputStream os = response.getOutputStream();
@@ -59,21 +71,15 @@
             copy(is, os);
             is.close();
             os.close();
-            */
         } else if ("/test4".equals(path)) {
-            throw new ServletException("Unknown path " + path);
-            /* TODO: implement the block protocol for the Spring context
-            URL url = new URL("block:demo2:/any");
-            URLConnection conn = url.openConnection();
-            InputStream is = conn.getInputStream();
-
+            Source source = this.resolver.resolveURI("block:demo2:/any");
+            InputStream is = source.getInputStream();
             response.setContentType("text/plain");
             OutputStream os = response.getOutputStream();
             
             copy(is, os);
             is.close();
             os.close();
-            */
         } else {
             throw new ServletException("Unknown path " + path);
         }

Modified: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/pom.xml?view=diff&rev=453933&r1=453932&r2=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/pom.xml (original)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-impl/pom.xml Sat Oct  7 08:32:19 2006
@@ -34,16 +34,6 @@
   <name>Blocks Framework Implementation</name>
   <dependencies>
     <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>osgi_R4_core</artifactId>
-      <version>1.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>osgi_R4_compendium</artifactId>
-      <version>1.0</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-core</artifactId>
       <version>2.2.0-M2-SNAPSHOT</version>

Modified: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/pom.xml?view=diff&rev=453933&r1=453932&r2=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/pom.xml (original)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/pom.xml Sat Oct  7 08:32:19 2006
@@ -29,53 +29,14 @@
     <version>2-SNAPSHOT</version>
   </parent>
   <artifactId>cocoon-blocks-fw-sample</artifactId>
-  <packaging>war</packaging>
-  <name>Blocks Framework Sample Webapp</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>maven-jetty6-plugin</artifactId>
-        <version>6.0.0beta10</version>
-        <configuration>
-          <connectors>
-            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
-              <port>8888</port>
-              <maxIdleTime>30000</maxIdleTime>
-            </connector>
-          </connectors>
-          <systemProperties>
-            <systemProperty>
-              <name>org.apache.commons.logging.Log</name>
-              <value>org.apache.commons.logging.impl.SimpleLog</value>
-            </systemProperty>
-          </systemProperties>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+  <packaging>jar</packaging>
+  <version>1.0.0-SNAPSHOT</version>
+  <name>Blocks Framework Sample Blocks</name>
   <dependencies>
     <dependency>
       <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-blocks-fw-ecm-impl</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-blocks-fw-servlet-impl</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-sitemap-impl</artifactId>
-      <version>1.0-SNAPSHOT</version>
+      <artifactId>cocoon-blocks-fw-impl</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
-  <pluginRepositories>
-    <pluginRepository>
-      <id>mortbay-repo</id>
-      <name>mortbay-repo</name>
-      <url>http://www.mortbay.org/maven2/snapshot</url>
-    </pluginRepository>
-  </pluginRepositories>
 </project>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sitemap.xmap?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sitemap.xmap (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sitemap.xmap Sat Oct  7 08:32:19 2006
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- 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 type="xml"/>
+      </map:match>
+
+      <map:match pattern="test2">
+        <map:generate src="block:test2:/test"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test3">
+        <map:generate src="block:/test"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test4">
+        <map:generate src="resource://META-INF/classes/test.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="sub/**">
+        <map:mount uri-prefix="sub" src="sub/"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/block-paths.xsl
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/block-paths.xsl?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/block-paths.xsl (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/block-paths.xsl Sat Oct  7 08:32:19 2006
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id:$ -->
+
+<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}" other="{$other}"/>
+    <!--properties abs="{$abs}" rel="{$rel}" other="{$other}"/-->
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/path-expected.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/path-expected.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/path-expected.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/path-expected.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<properties other="/test2/test" rel="/test1/sub/test" abs="/test1/test"/>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/sitemap.xmap?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/sitemap.xmap (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/sitemap.xmap Sat Oct  7 08:32:19 2006
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- 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 type="xml"/>
+      </map:match>
+
+      <!-- no relative paths yet -->
+      <map:match pattern="test2">
+        <map:generate src="block:./test"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test3">
+        <map:generate src="block:/test"/>
+        <map:serialize type="xml"/>
+      </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 type="xml"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/test.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/test.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/test.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/sub/test.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<sub/>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/test.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/test.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/test.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test1/test.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<test/>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/sitemap.xmap?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/sitemap.xmap (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/sitemap.xmap Sat Oct  7 08:32:19 2006
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- 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 type="xml"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/test.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/test.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/test.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test2/test.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<test2/>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/block-properties.xsl
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/block-properties.xsl?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/block-properties.xsl (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/block-properties.xsl Sat Oct  7 08:32:19 2006
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id:$ -->
+
+<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>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/prop-expected.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/prop-expected.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/prop-expected.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/prop-expected.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<properties baz="blah" bar="gazonk" foo="bar"/>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/sitemap.xmap?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/sitemap.xmap (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/sitemap.xmap Sat Oct  7 08:32:19 2006
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- SVN $Id:$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:pipelines>
+    <map:pipeline type="noncaching">
+
+      <map:match type="wildcard" pattern="test">
+        <map:generate type="file" src="test.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match type="wildcard" pattern="test4">
+        <map:generate type="file" src="block:super:/test"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match type="wildcard" pattern="prop">
+        <map:generate type="file" src="test.xml"/>
+        <map:transform type="xslt" 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 type="xml"/>
+      </map:match>
+
+      <map:match type="wildcard" pattern="**">
+        <map:read src="block:super:/{1}"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/test.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/test.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/test.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/COB-INF/test3/test.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<test3/>

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet1.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet1.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet1.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet1.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- @version $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+	<bean id="org.apache.cocoon.blocks.sample.block1" class="org.apache.cocoon.blocks.BlockServlet">
+		<property name="mountPath" value="/cocoon-blocks-fw-sample1"/>
+		<property name="servletClass" value="org.apache.cocoon.sitemap.SitemapServlet"/>
+		<property name="blockContextURL" value="/blocks/cocoon-blocks-fw-sample/test1"/>
+		<property name="properties">
+			<map>
+				<entry key="foo" value="bar"/>
+			</map>
+		</property>
+		<property name="connections">
+			<map>
+				<entry key="test2" value-ref="org.apache.cocoon.blocks.sample.block2"/>
+			</map>
+		</property>
+	</bean>
+</beans>
\ No newline at end of file

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet2.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet2.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet2.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet2.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- @version $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+	<bean id="org.apache.cocoon.blocks.sample.block2" class="org.apache.cocoon.blocks.BlockServlet">
+		<property name="mountPath" value="/cocoon-blocks-fw-sample2"/>
+		<property name="servletClass" value="org.apache.cocoon.sitemap.SitemapServlet"/>
+		<property name="blockContextURL" value="/blocks/cocoon-blocks-fw-sample/test2"/>
+	</bean>
+</beans>
\ No newline at end of file

Added: cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet3.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet3.xml?view=auto&rev=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet3.xml (added)
+++ cocoon/trunk/core/cocoon-blocks-fw/cocoon-blocks-fw-sample/src/main/resources/META-INF/spring/cocoon-blocks-fw-sample-blockServlet3.xml Sat Oct  7 08:32:19 2006
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- @version $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+	<bean id="org.apache.cocoon.blocks.sample.block3" class="org.apache.cocoon.blocks.BlockServlet">
+		<property name="mountPath" value="/cocoon-blocks-fw-sample3"/>
+		<property name="servletClass" value="org.apache.cocoon.sitemap.SitemapServlet"/>
+		<property name="blockContextURL" value="/blocks/cocoon-blocks-fw-sample/test3"/>
+		<property name="properties">
+			<map>
+				<entry key="bar" value="gazonk"/>
+				<entry key="baz" value="blah"/>
+			</map>
+		</property>
+		<property name="connections">
+			<map>
+				<entry key="super" value-ref="org.apache.cocoon.blocks.sample.block1"/>
+			</map>
+		</property>
+	</bean>
+</beans>
\ No newline at end of file

Modified: cocoon/trunk/core/cocoon-blocks-fw/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-blocks-fw/pom.xml?view=diff&rev=453933&r1=453932&r2=453933
==============================================================================
--- cocoon/trunk/core/cocoon-blocks-fw/pom.xml (original)
+++ cocoon/trunk/core/cocoon-blocks-fw/pom.xml Sat Oct  7 08:32:19 2006
@@ -35,10 +35,10 @@
     <module>cocoon-blocks-fw-impl</module>
     <module>cocoon-blocks-fw-demo1</module>
     <module>cocoon-blocks-fw-demo2</module>
+    <module>cocoon-blocks-fw-sample</module>
     <!--
     <module>cocoon-blocks-fw-ecm-impl</module>
     <module>cocoon-blocks-fw-servlet-impl</module>
-    <module>cocoon-blocks-fw-sample</module>
     -->
     <module>cocoon-default</module>
   </modules>

Modified: cocoon/trunk/core/cocoon-webapp/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-webapp/pom.xml?view=diff&rev=453933&r1=453932&r2=453933
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/pom.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/pom.xml Sat Oct  7 08:32:19 2006
@@ -115,6 +115,11 @@
       <artifactId>cocoon-blocks-fw-demo2</artifactId>
       <version>1.0.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-blocks-fw-sample</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
   </dependencies>
   
   <profiles>