forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r603576 - in /forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF: internal.xmap sitemap.xmap
Date Wed, 12 Dec 2007 11:39:19 GMT
Author: thorsten
Date: Wed Dec 12 03:39:17 2007
New Revision: 603576

URL: http://svn.apache.org/viewvc?rev=603576&view=rev
Log:
changing the name of the xmap and implementing the new matches

Added:
    forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/sitemap.xmap
      - copied, changed from r603575, forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/internal.xmap
Removed:
    forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/internal.xmap

Copied: forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/sitemap.xmap
(from r603575, forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/internal.xmap)
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/sitemap.xmap?p2=forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/sitemap.xmap&p1=forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/internal.xmap&r1=603575&r2=603576&rev=603576&view=diff
==============================================================================
--- forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/internal.xmap
(original)
+++ forrest/trunk/whiteboard/cocoon-2.2-blocks/dispatcher/src/main/resources/COB-INF/sitemap.xmap
Wed Dec 12 03:39:17 2007
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?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
@@ -7,269 +7,179 @@
   (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
-  
+      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.
 -->
-<!-- forrest:structurer
-  ***********************
-  The structuring of the assembled page where all content is in place
-  and structured with forrest:hooks to provide hooks for theming.
-  
-  It is the job of a forrest:structurer to define this structure. The
-  structurer uses for this a couple of helper classes forrest:contracts,
-  forrest:hooks and forrest:properties. But there is more to a
-  forrest:structurer than just structure. 
+<map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
   
-  The structurer is not limited to a document but can request and
-  structure the content from multiple input sources. Far more actually
-  because it provides as well logical conditions for presentation formatting logic
--->
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  <map:components>
-    <map:generators default="file">
-      <map:generator label="content" logger="sitemap.generator.xpathdirectory" 
-        name="xpathdirectory" 
-        src="org.apache.cocoon.generation.XPathDirectoryGenerator"/>
-      <map:generator name="directory" 
-        src="org.apache.cocoon.generation.DirectoryGenerator" />
-      <map:generator name="jx" logger="sitemap.generator.jx" 
-        src="org.apache.cocoon.generation.JXTemplateGenerator" 
-        label="content,data" pool-max="16" />
-      <map:generator name="text" 
-        src="org.apache.cocoon.generation.TextGenerator">
-        <parameter name="localizable" value="true" />
-      </map:generator>
-    </map:generators>
-    <map:transformers default="xslt">
-      <map:transformer logger="sitemap.transformer.jx" name="jx" pool-max="16" 
-        src="org.apache.cocoon.transformation.JXTemplateTransformer" />
-      <map:transformer logger="sitemap.transformer.jpath" name="jpath" 
-        src="org.apache.cocoon.transformation.JPathTransformer" />
-      <map:transformer name="dispatcher" 
-        src="org.apache.forrest.dispatcher.transformation.DispatcherTransformer" 
-        />
-      <map:transformer name="i18n" 
-        src="org.apache.cocoon.transformation.I18nTransformer">
-        <catalogues default="contracts">
-          <catalogue id="other" name="OtherMessages" location="{lm:project.translations}"
/>
-          <catalogue id="contracts" name="ContractsMessages" 
-            location="{lm:project.translations}" />
-        </catalogues>
-        <cache-at-startup>true</cache-at-startup>
-      </map:transformer>
-    </map:transformers>
-    <map:serializers default="xml-utf8">
-      <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" 
-        name="xhtml" pool-grow="2" pool-max="64" pool-min="2" 
-        src="org.apache.cocoon.serialization.XMLSerializer">
-        <doctype-public> -//W3C//DTD XHTML 1.0 Strict//EN </doctype-public>
-        <doctype-system> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd 
-          </doctype-system>
-        <encoding>UTF-8</encoding>
-        <indent>yes</indent>
-        <omit-xml-declaration>yes</omit-xml-declaration>
-      </map:serializer>
-      <map:serializer mime-type="image/png" name="svg2png" 
-        src="org.apache.cocoon.serialization.SVGSerializer">
-<!--<parameter name="background_color" type="color" value="#ff00ff"/>-->
-<!-- <parameter name="gamma" type="float" value="0.48"/> -->
-        <parameter name="gamma" type="float" value="0" />
-      </map:serializer>
-      <map:serializer name="xml-utf8" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer">
-        <encoding>UTF-8</encoding>
-      </map:serializer>
-    </map:serializers>
-    <map:actions>
-      <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction" />
-    </map:actions>
-    <map:pipes default="caching"/>
-  </map:components>
   <map:pipelines>
-<!--FOR-808 WORKAROUND
-      Creating a virtual skinconf from the properties module.
-      The core depends on a skinconf but the dispatcher not.
-      See as well FOR-829 where we use this config.-->
-    <map:pipeline>
-      <map:match pattern="skinconf.xml">
-        <map:generate src="cocoon://module.properties.properties" />
-        <map:serialize />
+    <map:pipeline id="usage">
+      <map:match pattern="">
+        <map:generate src="demo/welcome.xml"/>
+        <map:transform src="demo/welcome.xslt"/>
+        <map:serialize type="xhtml"/>
+      </map:match>
+      
+      <map:match pattern="test">
+        <map:generate src="{lm:demo}"/>
+        <map:transform src="resource/stylesheets/testing.xsl">
+        <map:parameter value="xxx-{lm:hooks-to-html.xsl}" name="test"/>
+        </map:transform>
+        <map:serialize type="xml"/>
       </map:match>
+      
     </map:pipeline>
-<!--
-      structurer
-      prepares and transforms the requested contracts (themes) and populate them with the
content (businessHelper).
-    -->
-    <map:pipeline>
-      <map:act type="locale" >
-        <map:match pattern="resolve.structurer.**">
-          <map:generate src="lm://resolve.structurer.{1}" />
-          <map:serialize />
-        </map:match>
-        <map:match pattern="resolve.contract.*.**">
-          <map:generate src="{lm:resolve.contract.{1}.{2}}" />
-          <map:transform type="i18n">
-            <map:parameter name="locale" value="{../locale}" />
-          </map:transform>
-          <map:serialize />
-        </map:match>
-      </map:act>
-    </map:pipeline>
-<!-- prepare the xsl:templates of the requested contract.
-      {1} format to deliver
-      {2} contract name
-      Note - This pipeline is useful to include contracts into another. To include a contract
:
-            <xsl:include href="cocoon://prepare.contract.html.NameOfTheContract"/>
-      Warning - At the moment, the contracts do not manage formats anymore... -->
-    <map:pipeline>
-      <map:act type="locale" >
-        <map:match pattern="prepare.contract.*.**">
-          <map:generate src="{lm:resolve.contract.{1}.{2}}" />
-          <map:transform src="{lm:contract-strip-xsl.xsl}"/>
-          <map:transform type="i18n">
-            <map:parameter name="locale" value="{../locale}" />
-          </map:transform>
-          <map:serialize />
-        </map:match>
-      </map:act>
-    </map:pipeline>
-<!-- You can group elements to a template and call it from any view. 
-      <jx:import uri="cocoon://prepare.panels.export-link"/>
-    -->
-    <map:pipeline>
-      <map:match pattern="prepare.panels.**">
-        <map:generate src="{lm:resolve.panels.{1}}" />
-        <map:transform type="linkrewriter" />
-        <map:transform src="{lm:root-strip.xsl}" />
-        <map:serialize />
+    
+    <map:pipeline id="lm">
+      <map:match pattern="locationmap.xml">
+        <map:generate src="locationmap.xml"/>
+        <map:serialize type="xml"/>
       </map:match>
     </map:pipeline>
-    <map:pipeline>
-<!--
-        Last processing step. 
-        Here we are overriding the default skin generation.
-      -->
+    
+    <map:pipeline id="dispatcher">
       <map:match pattern="**.html">
-        <map:generate src="cocoon:/resolve.structurer.{1}" type="jx">
-          <map:parameter name="lenient-xpath" value="true" />
-          <map:parameter name="getRequest" value="{1}" />
-          <map:parameter name="contextPath" value="{request:contextPath}" />
-          <map:parameter name="getRequestExtension" value="html" />
+        <map:generate src="lm://resolve.structurer.{1}" type="jx">
+          <map:parameter name="lenient-xpath" value="true"/>
+          <map:parameter name="getRequest" value="{1}"/>
+          <map:parameter name="contextPath" value="{request:contextPath}"/>
+          <map:parameter name="getRequestExtension" value="html"/>
         </map:generate>
         <map:transform type="dispatcher">
-          <map:parameter name="cacheKey" value="{0}" />
-          <map:parameter name="validityFile" value="cocoon:/resolve.structurer.{1}" />
-          <map:parameter name="request" value="{1}" />
-          <map:parameter name="type" value="html" />
-          <map:parameter name="hooksTransformer" value="lm://hooks-to-html.xsl" 
-            />
+          <map:parameter name="cacheKey" value="{0}"/>
+          <map:parameter name="validityFile"
+            value="lm://resolve.structurer.{1}"/>
+          <map:parameter name="request" value="{1}"/>
+          <map:parameter name="type" value="html"/>
+          <map:parameter name="hooksTransformer" value="lm://hooks-to-html.xsl"/>
         </map:transform>
-        <map:transform 
-          src="lm://transform.xml.xml-namespace-stripped" 
-          />
-        <map:transform 
-          src="lm://strip-dispatcher-remains-html.xsl" 
-          />
-        <map:serialize type="xhtml" />
+        <map:transform src="lm://namespace-stripped"/>
+        <map:transform src="lm://strip-dispatcher-remains-html.xsl"/>
+        <map:serialize type="xhtml"/>
       </map:match>
-<!--
-        Last processing step. 
-        Here we are overriding the default skin generation.
-      -->
       <map:match pattern="**.fo">
-        <map:generate src="cocoon:/resolve.structurer.{1}" type="jx">
-          <map:parameter name="lenient-xpath" value="true" />
-          <map:parameter name="getRequest" value="{1}" />
-          <map:parameter name="getRequestExtension" value="fo" />
-          <map:parameter name="contextPath" value="{request:contextPath}" />
+        <map:generate src="lm://resolve.structurer.{1}" type="jx">
+          <map:parameter name="lenient-xpath" value="true"/>
+          <map:parameter name="getRequest" value="{1}"/>
+          <map:parameter name="getRequestExtension" value="fo"/>
+          <map:parameter name="contextPath" value="{request:contextPath}"/>
         </map:generate>
         <map:transform type="dispatcher">
-          <map:parameter name="cacheKey" value="{0}" />
-          <map:parameter name="validityFile" value="cocoon:/resolve.structurer.{1}" />
-          <map:parameter name="request" value="{1}" />
-          <map:parameter name="type" value="fo" />
+          <map:parameter name="cacheKey" value="{0}"/>
+          <map:parameter name="validityFile"
+            value="lm://resolve.structurer.{1}"/>
+          <map:parameter name="request" value="{1}"/>
+          <map:parameter name="type" value="fo"/>
           <map:parameter name="hooksTransformer" value="lm://hooks-to-fo.xsl"/>
         </map:transform>
-        <map:transform 
-          src="lm://strip-dispatcher-remains-fo.xsl" 
-          />
-        <map:serialize  />
-      </map:match>
-      <map:match pattern="**.internal*">
-        <map:generate src="cocoon:/resolve.structurer.{1}" type="jx">
-          <map:parameter name="lenient-xpath" value="true" />
-          <map:parameter name="getRequest" value="{1}" />
-          <map:parameter name="getRequestExtension" value="internal{2}" />
-          <map:parameter name="contextPath" value="{request:contextPath}" />
-        </map:generate>
-        <map:transform type="dispatcher">
-          <map:parameter name="cacheKey" value="{0}" />
-          <map:parameter name="validityFile" value="cocoon:/resolve.structurer.{1}" />
-          <map:parameter name="dispatcher.caching" value="{properties:dispatcher.caching}"
/>
-          <map:parameter name="request" value="{1}" />
-          <map:parameter name="type" value="internal{2}" />
-        </map:transform>
-        <map:serialize  />
+        <map:transform src="lm://strip-dispatcher-remains-fo.xsl"/>
+        <map:serialize type="xml"/>
       </map:match>
       <map:match pattern="**.prepare.dispatcher.css">
-        <map:generate src="cocoon:/resolve.structurer.{1}" type="jx">
-          <map:parameter name="lenient-xpath" value="true" />
-          <map:parameter name="getRequest" value="{1}" />
-          <map:parameter name="getRequestExtension" value="css" />
-          <map:parameter name="contextPath" value="{request:contextPath}" />
+        <map:generate src="lm://resolve.structurer.{1}" type="jx">
+          <map:parameter name="lenient-xpath" value="true"/>
+          <map:parameter name="getRequest" value="{1}"/>
+          <map:parameter name="getRequestExtension" value="css"/>
+          <map:parameter name="contextPath" value="{request:contextPath}"/>
         </map:generate>
         <map:transform type="dispatcher">
-          <map:parameter name="cacheKey" value="{0}" />
-          <map:parameter name="validityFile" value="cocoon:/resolve.structurer.{1}" />
-          <map:parameter name="dispatcher.caching" value="{properties:dispatcher.caching}"
/>
-          <map:parameter name="request" value="{1}" />
-          <map:parameter name="type" value="css" />
+          <map:parameter name="cacheKey" value="{0}"/>
+          <map:parameter name="validityFile"
+            value="lm://resolve.structurer.{1}"/>
+          <map:parameter name="dispatcher.caching"
+            value="{global:dispatcher.caching}"/>
+          <map:parameter name="request" value="{1}"/>
+          <map:parameter name="type" value="css"/>
         </map:transform>
-        <map:serialize type="text" mime-type="text/css" />
+        <map:serialize type="text"/>
       </map:match>
       <map:match pattern="**.dispatcher.css">
-        <map:generate type="text" src="cocoon:/{1}.prepare.dispatcher.css" />
-        <map:transform type="pattern" 
-          src="{forrest:forrest.context}/resources/chaperon/grammars/link.xlex" />
-        <map:transform 
-          src="{forrest:forrest.context}/resources/chaperon/stylesheets/pattern2link.xsl"

-          />
-        <map:serialize type="text" mime-type="text/css" />
-      </map:match>
-      <map:match pattern="internal.**.*">
-        <map:generate src="lm://resolve.structurer.{2}-to-xhtml2" type="jx">
-          <map:parameter name="lenient-xpath" value="true" />
-          <map:parameter name="getRequest" value="{1}" />
-          <map:parameter name="getRequestExtension" value="xhtml2" />
-          <map:parameter name="contextPath" value="{request:contextPath}" />
-        </map:generate>
-        <map:transform type="dispatcher">
-          <map:parameter name="cacheKey" value="{0}" />
-          <map:parameter name="validityFile" value="cocoon:/resolve.structurer.{1}" />
-          <map:parameter name="dispatcher.caching" value="{forrest:dispatcher.caching}"
/>
-          <map:parameter name="request" value="{1}" />
-          <map:parameter name="type" value="xhtml2" />
-        </map:transform>
-        <map:serialize />
+        <map:generate type="text" src="cocoon://{1}.prepare.dispatcher.css"/>
+        <map:transform type="pattern"
+          src="resource/chaperon/grammars/link.xlex"/>
+        <map:transform
+          src="resource/chaperon/stylesheets/pattern2link.xsl"/>
+        <map:serialize type="text" mime-type="text/css"/>
       </map:match>
     </map:pipeline>
-    <map:pipeline>
-<!-- businessHelper -->
-      <map:mount uri-prefix="" src="dataModel.xmap" check-reload="yes" 
-        pass-through="true" />
+    
+    <map:pipeline id="contracts">
+      <map:act type="locale">
+        <map:match pattern="resolve.structurer.**">
+          <map:generate src="lm://resolve.structurer.{1}"/>
+          <map:serialize type="xml"/>
+        </map:match>
+        <map:match pattern="resolve.contract.*.**">
+          <map:generate src="{lm:resolve.contract.{1}.{2}}"/>
+          <map:serialize type="xml"/>
+        </map:match>
+        <map:match pattern="prepare.contract.*.**">
+          <map:generate src="{lm:resolve.contract.{1}.{2}}"/>
+          <map:transform src="{lm:contract-strip-xsl.xsl}"/>
+          <map:transform type="i18n">
+            <map:parameter name="locale" value="{../locale}"/>
+          </map:transform>
+          <map:serialize type="xml"/>
+        </map:match>
+      </map:act>
     </map:pipeline>
-<!-- linkmap -->
-    <map:pipeline>
-      <map:mount uri-prefix="" src="ls.xmap" check-reload="yes" 
-        pass-through="true" />
+    
+    <map:pipeline id="structurer">
+      <!-- You can group elements to a template and call it from any view. 
+      <jx:import uri="cocoon://prepare.panels.export-link"/>
+      -->
+      <map:match pattern="prepare.panels.**">
+        <map:generate src="{lm:resolve.panels.{1}}"/>
+        <map:transform src="{lm:root-strip.xsl}"/>
+        <map:serialize type="xml"/>
+      </map:match>
     </map:pipeline>
     <map:pipeline>
-      <map:mount uri-prefix="" src="themes.xmap" check-reload="yes" 
-        pass-through="true" />
+      <map:match pattern="**.props">
+        <map:generate
+          src="servlet:propertiesGenerator:/module.global.properties"/>
+        <map:transform src="resource/stylesheets/variable.helper.xsl">
+          <map:parameter name="path" value="{1}.html"/>
+          <map:parameter name="theme" value="{global:dispatcher.theme}"/>
+        </map:transform>
+        <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+    <map:pipeline id="resources">
+      <map:match pattern="themes/**.css">
+        <map:read mime-type="text/css" src="{lm:themes/{1}.css}" />
+      </map:match>
+      <map:match pattern="themes/**.js">
+        <map:read mime-type="application/x-javascript" src="{lm:themes/{1}.js}"/>
+      </map:match>
+      <map:match pattern="themes/images/**.*">
+        <map:match type="regexp" pattern="(.*\.)(jpg|JPG|Jpg|jpeg|Jpeg|JPEG)$">
+          <map:read src="{lm:{1}{2}}" mime-type="image/jpeg"/>
+          <!--<map:read mime-type="image/jpg" src="http://preproduccion.andaluciajunta.es/portalv4/img/{1}{2}"/>-->
+        </map:match>
+        <map:match type="regexp" pattern="(.*)(gif|GIF|Gif)$">
+          <map:read src="{lm:{1}{2}}" mime-type="image/gif"/>
+          <!--<map:read mime-type="image/jpg" src="http://preproduccion.andaluciajunta.es/portalv4/img/{1}{2}"/>-->
+        </map:match>
+        <map:match type="regexp" pattern="(.*)(png|PNG|Png)$">
+          <map:read src="{lm:{1}{2}}" mime-type="image/png"/>
+        </map:match>
+        <map:match type="regexp" pattern="(.*)(ico|ICO|Ico)$">
+          <map:read mime-type="image/x-icon" src="{lm:{1}{2}}"/>
+        </map:match>
+      </map:match>
     </map:pipeline>
+     <map:pipeline id="listing">
+      <map:mount uri-prefix="" src="ls.xmap" check-reload="yes" />
+    </map:pipeline>
+    
   </map:pipelines>
-</map:sitemap>
+  
+</map:sitemap>
\ No newline at end of file



Mime
View raw message