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/18 02:08:43 UTC

svn commit: r539184 - in /cocoon/trunk/blocks/cocoon-stx/cocoon-stx-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: Thu May 17 17:08:42 2007
New Revision: 539184

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

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

Modified: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/pom.xml?view=diff&rev=539184&r1=539183&r2=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/pom.xml (original)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/pom.xml Thu May 17 17:08:42 2007
@@ -38,7 +38,10 @@
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-stx-impl</artifactId>
-      
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-samples-style-default</artifactId>
     </dependency>
   </dependencies>
 </project>

Modified: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/page2html.stx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/page2html.stx?view=diff&rev=539184&r1=539183&r2=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/page2html.stx (original)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/page2html.stx Thu May 17 17:08:42 2007
@@ -15,8 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<stx:transform xmlns:stx="http://stx.sourceforge.net/2002/ns"
-	       version="1.0">
+<stx:transform xmlns:stx="http://stx.sourceforge.net/2002/ns" version="1.0">
 
   <stx:variable name="titleVal"/>
 
@@ -32,7 +31,7 @@
       <title>
 	<stx:value-of select="$titleVal"/>
       </title>
-      <link href="/styles/main.css" type="text/css" rel="stylesheet"/>
+      <link href="servlet:style-default:/styles/main.css" type="text/css" rel="stylesheet"/>
     </head>
   </stx:template>
 

Modified: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539184&r1=539183&r2=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 17:08:42 2007
@@ -17,10 +17,28 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-    <map:components />
+    <!-- =========================== Views =================================== -->
 
-    <map:pipelines>
+    <map:views>
+        <map:view name="content" from-label="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view name="links" from-position="last">
+            <map:serialize type="links" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Pipelines ================================= -->
 
+    <map:pipelines>
         <map:pipeline>
             <map:match pattern="">
                 <map:redirect-to uri="welcome" />
@@ -28,33 +46,37 @@
 
             <map:match pattern="welcome">
                 <map:generate src="samples.xml" />
-                <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-                    <map:parameter name="contextPath" value="{request:contextPath}" />
-                </map:transform>
-                <map:serialize />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html" />
+                </map:serialize>
             </map:match>
 
             <map:match pattern="hello.html">
                 <map:generate src="hello.xml" />
                 <map:transform type="stx" src="page2html.stx" />
+                <map:transform type="servletLinkRewriter" />
                 <map:serialize />
             </map:match>
 
             <map:match pattern="data.html">
                 <map:generate src="data.xml" />
                 <map:transform type="stx" src="sql2html.stx" />
+                <map:transform type="servletLinkRewriter" />
                 <map:serialize type="html" />
             </map:match>
 
             <map:match pattern="data.txt">
                 <map:generate src="data.xml" />
                 <map:transform type="stx" src="sql2txt.stx" />
+                <map:transform type="servletLinkRewriter" />
                 <map:serialize type="text" />
             </map:match>
 
             <map:match pattern="*.html">
                 <map:generate src="{1}.xml" />
                 <map:transform type="stx" src="{1}.stx" />
+                <map:transform type="servletLinkRewriter" />
                 <map:serialize />
             </map:match>
         </map:pipeline>

Modified: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2html.stx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2html.stx?view=diff&rev=539184&r1=539183&r2=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2html.stx (original)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2html.stx Thu May 17 17:08:42 2007
@@ -15,15 +15,13 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<stx:transform xmlns:stx="http://stx.sourceforge.net/2002/ns"
-	       xmlns:sql="http://apache.org/cocoon/SQL/2.0"
-	       version="1.0">
+<stx:transform xmlns:stx="http://stx.sourceforge.net/2002/ns" xmlns:sql="http://apache.org/cocoon/SQL/2.0" version="1.0">
 
   <stx:template match="sql:rowset">
     <html>
       <head>
 	<title>Table</title>
-	<link href="/styles/main.css" type="text/css" rel="stylesheet"/>
+	<link href="servlet:style-default:/styles/main.css" type="text/css" rel="stylesheet"/>
       </head>
       <body>
 	<table>

Modified: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2txt.stx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2txt.stx?view=diff&rev=539184&r1=539183&r2=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2txt.stx (original)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/sql2txt.stx Thu May 17 17:08:42 2007
@@ -15,9 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<stx:transform xmlns:stx="http://stx.sourceforge.net/2002/ns"
-	       xmlns:sql="http://apache.org/cocoon/SQL/2.0"
-	       version="1.0">
+<stx:transform xmlns:stx="http://stx.sourceforge.net/2002/ns" xmlns:sql="http://apache.org/cocoon/SQL/2.0" version="1.0">
 
   <stx:template match="sql:rowset">
     <stx:process-children group="list"/>

Modified: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/stx.xsamples
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/stx.xsamples?view=diff&rev=539184&r1=539183&r2=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/stx.xsamples (original)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/COB-INF/stx.xsamples Thu May 17 17:08:42 2007
@@ -18,7 +18,7 @@
 <xsamples xpath="/samples" unless="group[@name='STX']">
 
   <group name="STX">
-    <sample name="STX Block" href="stx/">
+    <sample name="STX Block" href="/cocoon-stx-sample/">
       Examples of using Streaming Transformations for XML (STX)
     </sample>
   </group>

Added: cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/META-INF/cocoon/spring/cocoon-stx-sample-blockServlet.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/META-INF/cocoon/spring/cocoon-stx-sample-blockServlet.xml?view=auto&rev=539184
==============================================================================
--- cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/META-INF/cocoon/spring/cocoon-stx-sample-blockServlet.xml (added)
+++ cocoon/trunk/blocks/cocoon-stx/cocoon-stx-sample/src/main/resources/META-INF/cocoon/spring/cocoon-stx-sample-blockServlet.xml Thu May 17 17:08:42 2007
@@ -0,0 +1,33 @@
+<?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.stx.sample.servlet" class="org.apache.cocoon.sitemap.SitemapServlet">
+        <servlet:context mount-path="/cocoon-stx-sample" context-path="blockcontext:/cocoon-stx-sample/">
+            <servlet:connections>
+                <entry key="style-default" value-ref="org.apache.cocoon.samples.style.default.servlet" />
+            </servlet:connections>
+        </servlet:context>
+    </bean>
+</beans>

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

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