You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2006/02/19 20:21:32 UTC

svn commit: r378942 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher: internal.xmap resources/stylesheets/helper/strip-dispatcher-remains.xsl

Author: thorsten
Date: Sun Feb 19 11:21:31 2006
New Revision: 378942

URL: http://svn.apache.org/viewcvs?rev=378942&view=rev
Log:
Enhanced the source code output of dispatcher xhtml serializer

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl   (with props)
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap?rev=378942&r1=378941&r2=378942&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap Sun Feb 19 11:21:31 2006
@@ -71,6 +71,8 @@
         <doctype-system> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd 
           </doctype-system>
         <encoding>UTF-8</encoding>
+        <indent>yes</indent>
+        <omit-xml-declaration>no</omit-xml-declaration>
       </map:serializer>
       <map:serializer mime-type="image/png" name="svg2png" 
         src="org.apache.cocoon.serialization.SVGSerializer">
@@ -83,21 +85,16 @@
       <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction" />
     </map:actions>
   </map:components>
-  <map:resources>
-    <map:resource name="jx-transformer">
-      <map:transform type="jx">
-        <map:parameter name="lenient-xpath" value="true" />
-        <map:parameter name="getRequest" value="{request}" />
-        <map:parameter name="getRequestExstension" value="{exstension}" />
-      </map:transform>
-    </map:resource>
-  </map:resources>
   <map:pipelines>
     <!--
       structurer
       prepares and transforms the requested contracts (themes) and populate them with the content (businessHelper).
     -->
     <map:pipeline>
+      <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">
@@ -127,7 +124,7 @@
         Here we are overriding the default skin generation.
       -->
       <map:match pattern="**.html">
-        <map:generate src="lm://resolve.structurer.{1}" type="jx">
+        <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="getRequestExstension" value="html" />
@@ -138,10 +135,13 @@
           <map:parameter name="hooksTransformer" value="lm://hooks-to-html.xsl" 
             />
         </map:transform>
+        <map:transform 
+          src="resources/stylesheets/helper/strip-dispatcher-remains.xsl" 
+          />
         <map:serialize type="xhtml" />
       </map:match>
       <map:match pattern="**.dispatcher.css">
-        <map:generate src="lm://resolve.structurer.{1}" type="jx">
+        <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="getRequestExstension" value="css" />

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl?rev=378942&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl Sun Feb 19 11:21:31 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+  xmlns:forrest="http://apache.org/forrest/templates/1.0">
+
+  <xsl:import href="lm://transform.xml.xml-namespace-stripped"/>
+
+  <xsl:template match="/">
+    <html>
+      <xsl:apply-templates select="html/head"/>
+      <xsl:apply-templates select="html/body"/>
+    </html>
+  </xsl:template>
+
+
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl
------------------------------------------------------------------------------
    svn:eol-style = native