You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by fe...@apache.org on 2007/05/16 11:06:14 UTC

svn commit: r538490 - in /cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample: ./ src/main/resources/COB-INF/ src/main/resources/META-INF/ src/main/resources/META-INF/cocoon/ src/main/resources/META-INF/cocoon/spring/

Author: felixk
Date: Wed May 16 02:06:12 2007
New Revision: 538490

URL: http://svn.apache.org/viewvc?view=rev&rev=538490
Log:
- move to servlet-service
- add blockServlet bean

Added:
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml   (with props)
Modified:
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/pom.xml
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/itext.xsamples
    cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/sitemap.xmap

Modified: cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/pom.xml?view=diff&rev=538490&r1=538489&r2=538490
==============================================================================
--- cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/pom.xml (original)
+++ cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/pom.xml Wed May 16 02:06:12 2007
@@ -38,7 +38,14 @@
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-itext-impl</artifactId>
-      
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-core-main-sample</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-samples-style-default</artifactId>
     </dependency>
   </dependencies>
 </project>

Modified: cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/itext.xsamples
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/itext.xsamples?view=diff&rev=538490&r1=538489&r2=538490
==============================================================================
--- cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/itext.xsamples (original)
+++ cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/itext.xsamples Wed May 16 02:06:12 2007
@@ -19,7 +19,7 @@
 <xsamples xpath="/samples" unless="group[@name='iText']">
 
   <group name="iText">
-    <sample name="iText Block" href="itext/">
+    <sample name="iText Block" href="/cocoon-itext-sample/">
       Examples of PDF document generation using iText.
     </sample>
   </group>

Modified: cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=538490&r1=538489&r2=538490
==============================================================================
--- cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/COB-INF/sitemap.xmap Wed May 16 02:06:12 2007
@@ -32,7 +32,8 @@
     </map:view>
 
     <map:view from-label="content" name="pretty-content">
-      <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+      <map:transform src="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
+      <map:transform type="servletLinkRewriter" />
       <map:serialize type="html"/>
     </map:view>
 
@@ -53,16 +54,15 @@
       <!-- list of samples -->
       <map:match pattern="welcome">
         <map:generate src="misc/samples.xml"/>
-        <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
+        <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl" />
+        <map:transform type="servletLinkRewriter" />
         <map:serialize/>
       </map:match>
 
       <!-- hello world -->
       <map:match pattern="hello.pdf">
-        <map:generate src="context://samples/hello-world/content/hello.xml"/>
-        <map:transform src="context://samples/hello-world/style/xsl/page2itext.xsl"/>
+        <map:generate src="servlet:main-sample:/hello-world/hello.xml"/>
+        <map:transform src="servlet:main-sample:/hello-world/style/xsl/page2itext.xsl"/>
         <map:serialize type="itext2pdf">
           <map:parameter name="page-size" value="A4"/>
           <map:parameter name="page-orientation" value="portrait"/>
@@ -81,15 +81,17 @@
         <map:serialize type="itext2pdf"/>
       </map:match>
 
-      <!-- reuse the XSP caching example for our caching test -->
+      <!-- This would need to add the cocoon-xsp-sample block. Is this dependency desired? -->
+      <!-- reuse the XSP caching example for our caching test ->
       <map:match pattern="cache-test-*.pdf">
-        <!-- note that caching didn't work when accessing the XSP using the cocoon:/ protocol -->
+        <!- note that caching didn't work when accessing the XSP using the cocoon:/ protocol ->
         <map:generate src="../xsp/java/cacheable.xsp" type="serverpages"/>
         <map:transform src="cache-test/xsp-sample-to-itext.xsl">
           <map:parameter name="pages" value="{1}"/>
         </map:transform>
         <map:serialize type="itext2pdf"/>
       </map:match>
+      -->
 
     </map:pipeline>
   </map:pipelines>

Added: cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml?view=auto&rev=538490
==============================================================================
--- cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml (added)
+++ cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml Wed May 16 02:06:12 2007
@@ -0,0 +1,34 @@
+<?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"
+       xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+    <bean id="org.apache.cocoon.itext.sample.servlet" class="org.apache.cocoon.sitemap.SitemapServlet">
+        <servlet:context mount-path="/cocoon-itext-sample" context-path="blockcontext:/cocoon-itext-sample/">
+            <servlet:connections>
+                <entry key="main-sample" value-ref="org.apache.cocoon.core.main.sample.servlet" />
+                <entry key="style-default" value-ref="org.apache.cocoon.samples.style.default.servlet" />
+            </servlet:connections>
+        </servlet:context>
+    </bean>
+</beans>

Propchange: cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-itext/cocoon-itext-sample/src/main/resources/META-INF/cocoon/spring/cocoon-itext-sample-blockServlet.xml
------------------------------------------------------------------------------
    svn:keywords = Id