forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r320710 - in /forrest/trunk/whiteboard/plugins: org.apache.forrest.plugin.internal.structurer/ org.apache.forrest.plugin.internal.structurer/resources/stylesheets/ org.apache.forrest.plugin.internal.structurer/resources/views/ org.apache.fo...
Date Thu, 13 Oct 2005 10:20:11 GMT
Author: thorsten
Date: Thu Oct 13 03:19:07 2005
New Revision: 320710

URL: http://svn.apache.org/viewcvs?rev=320710&view=rev
Log:
Views v2 codename: (views-) structurer
- forrest:call-template is not working anymore you have to use <jx:import uri="cocoon://prepare.tiles.export-link"/>
instead
- forrest:contracts: You have to include nuggets now with jx:import as well:
<forrest:property name="content-minitoc-toc" nugget="get.toc">
- <url>#{$cocoon/parameters/getRequest}.toc.xml</url>
+ <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
</forrest:property>
- All matches in the structurer are using now the lm.
- No xincludes any more in the structurer, this has to be done now with jx:import.
- generally slimed done processing pipelines.

In a second step I will refactor as well themes. 
HEADSUP: I did not updated the pelt theme yet! This theme will be broken till I changed the
nugget contracts and the forrest:call-templates.

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/root-strip.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/acting/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/acting/RecursiveDirectoryTraversalAction.java
      - copied, changed from r312912, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/plugin/internal/view/acting/RecursiveDirectoryTraversalAction.java
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/
      - copied from r312912, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/default.fv
      - copied, changed from r320703, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/default.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/default.scale-dev.fv
      - copied unchanged from r320703, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/default.scale-dev.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/pelt.fv
      - copied unchanged from r320703, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/pelt.fv
Removed:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/plugin/internal/view/acting/RecursiveDirectoryTraversalAction.java
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/dataModel.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/internal.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.include.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.properties.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.xhtml.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/output.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/templates/export-link.vt.xml

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/dataModel.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/dataModel.xmap?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/dataModel.xmap
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/dataModel.xmap
Thu Oct 13 03:19:07 2005
@@ -56,21 +56,6 @@
       <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">
-        <!--+
-            | You can choose from Strict, Transitional, or Frameset XHTML.
-            | For Strict XHTML set doctype to:
-            |   <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>
-            | For Transitional XHTML set doctype to:
-            |   <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
-            |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
-            | For Frameset XHTML set doctype to:
-            |   <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public>
-            |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</doctype-system>
-            |
-            | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than
one
-            | XHTML DTD simultaneously, you can define several XHTML serializers.
-            +-->
         <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>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/internal.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/internal.xmap?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/internal.xmap
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/internal.xmap
Thu Oct 13 03:19:07 2005
@@ -2,13 +2,13 @@
 <!--
   Copyright 1999-2004 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
-
+  
+  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.
@@ -17,231 +17,260 @@
 -->
 
 <!-- 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. 
-
-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
+  ***********************
+  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. 
+  
+  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:pipes default="caching">
-      <map:pipe name="caching" 
-        src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
-      <map:pipe name="noncaching" 
-        src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
+      <map:pipe name="caching"
+        src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline" />
+      <map:pipe name="noncaching"
+        src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline" />
     </map:pipes>
     <map:selectors>
-      <map:selector logger="sitemap.selector.exists" name="exists" 
+      <map:selector logger="sitemap.selector.exists" name="exists"
         src="org.apache.forrest.sourceexists.SourceExistsSelector" />
     </map:selectors>
     <map:generators default="file">
-      <map:generator name="traverse" 
-        src="org.apache.cocoon.generation.TraversableGenerator" 
-        logger="sitemap.generator.traverse" label="content" pool-max="16" />
-      <map:generator name="directory" 
+      <map:generator name="traverse"
+        src="org.apache.cocoon.generation.TraversableGenerator"
+        logger="sitemap.generator.traverse" label="content"
+        pool-max="16" />
+      <map:generator name="directory"
         src="org.apache.cocoon.generation.DirectoryGenerator" />
       <!--map:generator name="jx" logger="sitemap.generator.jx" 
         src="org.apache.cocoon.template.JXTemplateGenerator" 
         label="content,data" pool-max="16"-->
-      <map:generator name="jx" logger="sitemap.generator.jx" 
-        src="org.apache.cocoon.generation.JXTemplateGenerator" 
-        label="content,data" pool-max="16">
-      </map:generator>
+      <map:generator name="jx" logger="sitemap.generator.jx"
+        src="org.apache.cocoon.generation.JXTemplateGenerator"
+        label="content,data" pool-max="16" />
+
     </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="cinclude" 
-        src="org.apache.cocoon.transformation.CIncludeTransformer"/>
-      <map:transformer name="xinclude" 
-        src="org.apache.cocoon.transformation.XIncludeTransformer"/>
+      <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="cinclude"
+        src="org.apache.cocoon.transformation.CIncludeTransformer" />
+      <map:transformer name="xinclude"
+        src="org.apache.cocoon.transformation.XIncludeTransformer" />
+      <!-- Rewrites links, e.g. transforming href="site:index" to href="../index.html"
-->
+      <!-- See http://forrest.apache.org/docs/sitemap-ref.html#linkrewriting_impl -->
+      <map:transformer name="linkrewriter"
+        logger="sitemap.transformer.linkrewriter"
+        src="org.apache.cocoon.transformation.LinkRewriterTransformer">
+        <link-attrs>uri</link-attrs>
+        <schemes>lm</schemes>
+        <input-module name="lm" />
+      </map:transformer>
+
     </map:transformers>
     <map:serializers default="xml">
-      <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" 
-        name="xhtml" pool-grow="2" pool-max="64" pool-min="2" 
+      <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">
-        <!--+
-            | You can choose from Strict, Transitional, or Frameset XHTML.
-            | For Strict XHTML set doctype to:
-            |   <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>
-            | For Transitional XHTML set doctype to:
-            |   <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
-            |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
-            | For Frameset XHTML set doctype to:
-            |   <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public>
-            |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</doctype-system>
-            |
-            | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than
one
-            | XHTML DTD simultaneously, you can define several XHTML serializers.
-            +-->
-        <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>
+        <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>
       </map:serializer>
-      <map:serializer name="text" 
-        src="org.apache.cocoon.serialization.TextSerializer" 
+      <map:serializer name="text"
+        src="org.apache.cocoon.serialization.TextSerializer"
         mime-type="text/plain" logger="sitemap.serializer.text" />
     </map:serializers>
     <map:actions>
-      <map:action name="fallbackResolverAction" 
-        src="org.apache.forrest.plugin.internal.view.acting.FallbackResolverAction"/>
+      <map:action name="fallbackResolverAction"
+        src="org.apache.forrest.plugin.internal.view.acting.FallbackResolverAction" />
     </map:actions>
   </map:components>
   <map:resources>
     <map:resource name="skinit">
       <map:select type="exists">
-        <map:when 
+        <map:when
           test="{project:skins-dir}{project:theme}/xslt/html/{type}.xsl">
-          <map:transform 
+          <map:transform
             src="{project:skins-dir}{project:theme}/xslt/html/{type}.xsl">
-            <map:parameter name="notoc" value="{notoc}"/>
+            <map:parameter name="notoc" value="{notoc}" />
             <!-- FIXME: do we need this anymore? -->
             <!-- For backwards-compat with 0.2 - 0.4 skins -->
-            <map:parameter name="isfaq" value="{notoc}"/>
-            <map:parameter name="nopdf" value="{nopdf}"/>
-            <map:parameter name="path" value="{path}"/>
-            <map:parameter name="config-file" value="{project:skinconf}"/>
+            <map:parameter name="isfaq" value="{notoc}" />
+            <map:parameter name="nopdf" value="{nopdf}" />
+            <map:parameter name="path" value="{path}" />
+            <map:parameter name="config-file"
+              value="{project:skinconf}" />
           </map:transform>
         </map:when>
         <map:otherwise>
           <map:transform src="resources/stylesheets/html/{type}.xsl">
-            <map:parameter name="notoc" value="{notoc}"/>
+            <map:parameter name="notoc" value="{notoc}" />
             <!-- For backwards-compat with 0.2 - 0.4 skins -->
-            <map:parameter name="isfaq" value="{notoc}"/>
-            <map:parameter name="nopdf" value="{nopdf}"/>
-            <map:parameter name="path" value="{path}"/>
-            <map:parameter name="config-file" value="{project:skinconf}"/>
+            <map:parameter name="isfaq" value="{notoc}" />
+            <map:parameter name="nopdf" value="{nopdf}" />
+            <map:parameter name="path" value="{path}" />
+            <map:parameter name="config-file"
+              value="{project:skinconf}" />
           </map:transform>
         </map:otherwise>
       </map:select>
-      <map:serialize/>
+      <map:serialize />
     </map:resource>
   </map:resources>
   <map:pipelines>
     <map:pipeline>
       <!-- businessHelper -->
-      <map:mount uri-prefix="" src="dataModel.xmap" check-reload="yes" 
-        pass-through="true"/>
+      <map:mount uri-prefix="" src="dataModel.xmap" check-reload="yes"
+        pass-through="true" />
     </map:pipeline>
-   
-<!--
-  structurer
-  prepares and transforms the requested contracts (themes) and populate them with the content
(businessHelper).
-  -->
     <map:pipeline>
-<!--FIXME: 
-  type="jx" and move to lm
-  
-    View config resolver
-    File specific views have priority before default ones.
-    If no views can be found in the project we use the default one of the view plugin.
-    {1} - requested url
+      <!-- linkmap -->
+      <map:mount uri-prefix="" src="linkmap.xmap" check-reload="yes"
+        pass-through="true" />
+    </map:pipeline>
+    <!--
+      structurer
+      prepares and transforms the requested contracts (themes) and populate them with the
content (businessHelper).
     -->
-      <map:match pattern="prepare.jxWorkaround.**">
-        <map:act type="fallbackResolverAction">
-          <map:parameter value="{1}" name="request"/>
-          <map:parameter value="{project:theme}" name="projectFallback"/>
-          <map:parameter value="{project:theme-ext}" name="projectExtension"/>
-          <map:parameter value="{project:content.xdocs}" name="projectDir"/>
-          <map:parameter value="{defaults:view-themes}" name="defaultDir"/>
-          <map:parameter value="{defaults:theme}" name="defaultFallback"/>
-          <map:parameter value="{defaults:theme-ext}" name="defaultExtension"/>
-          <map:generate src="{uri}"/>
-          <map:transform 
-            src="resources/stylesheets/prepare.include.templates.xsl"/>
-          <map:transform type="xinclude"/>
-          <map:serialize/>
-        </map:act>
+    <!-- Structurer population
+      a. Resolve request specific strucuturer template.
+      b. Add businessHelper and tiles to the presentation model 
+      that the content can be used later on.
+      {1} - requested url (striped from extension) -->
+    <map:pipeline>
+      <map:match pattern="prepare.structurer.**">
+        <map:generate src="{lm:resolve.structurer.{1}}" />
+        <!-- FIXME: jxpath -->
+        <!-- When jxpath problem is solved rewrite tiles and uncomment -->
+        <!-- <map:transform type="linkrewriter" /> -->
+        <map:transform type="jx">
+          <map:parameter name="lenient-xpath" value="true" />
+          <map:parameter name="getRequest" value="{1}" />
+        </map:transform>
+        <map:serialize />
       </map:match>
-      
-      <map:match pattern="prepare.view.**">
-        <map:generate type="jx" src="cocoon:/prepare.jxWorkaround.{1}">
-          <map:parameter name="lenient-xpath" value="true"/>
-          <map:parameter name="getRequest" value="{1}"/>
-        </map:generate>
-        <map:serialize/>
+    </map:pipeline>
+    <!-- You can group elements to a template and call it from any view. 
+      <jx:import uri="cocoon://prepare.tiles.export-link"/>
+    -->
+    <map:pipeline>
+      <map:match pattern="prepare.tiles.**">
+        <map:generate src="{lm:resolve.tiles.{1}}" />
+        <!-- FIXME: jxpath -->
+        <!-- When jxpath problem is solved rewrite tiles and uncomment -->
+        <!-- <map:transform type="linkrewriter" /> -->
+        <map:transform type="jx">
+          <map:parameter name="lenient-xpath" value="true" />
+          <map:parameter name="getRequest" value="{1}" />
+        </map:transform>
+        <map:transform src="{lm:root-strip.xsl}" />
+        <map:serialize />
       </map:match>
-    
-      <!--
-        Add businessHelper to the presentation model that the content can be used later on.
-        {1} - requested url -->
-      <map:match pattern="prepare.view-nugget.**">
-        <map:generate src="cocoon:/prepare.view.{1}">
-          <map:parameter name="lenient-xpath" value="true"/>
-          <map:parameter name="getRequest" value="{1}"/>
-        </map:generate>
-        <map:transform src="resources/stylesheets/prepare.view.xsl">
-          <map:parameter name="view" value="{1}"/>
+    </map:pipeline>
+    <map:pipeline>
+      <map:match pattern="test.*.**">
+        <map:generate src="{lm:structurer-properties.{1}.{2}}" type="jx" />
+        <map:serialize />
+        <map:transform src="resources/stylesheets/temp.xsl">
+          <map:parameter name="test"
+            value="{lm:prepare.structurer.{2}}" />
         </map:transform>
-        <map:transform type="xinclude"/>
-        <map:serialize/>
+        <map:serialize />
       </map:match>
+    </map:pipeline>
+    <map:pipeline>
       <!--
-  Aggregate the contract-templates requested by the view with xinclude.
-  The result is a stylesheet with all needed xsl:templates.
-  {1} - format
-  {2} - requested url
-  -->
-      <map:match pattern="prepare.include.*.**">
-        <map:generate src="cocoon:/prepare.view.{2}"/>
-        <map:transform src="resources/stylesheets/prepare.include.xsl">
-          <map:parameter name="config-file" value="{project:skinconf}"/>
-          <!--Which output format?-->
-          <map:parameter name="format" value="{1}"/>
+        Aggregate the contract-templates requested by the view with cinclude.
+        The result is a stylesheet with all needed xsl:templates.
+        {1} - output format
+        {2} - requested url
+      -->
+      <map:match pattern="prepare.structurer-xsl.*.**">
+        <map:generate src="{lm:structurer.{2}}" />
+        <map:transform src="{lm:structurer-xsl-includes.xsl}">
+          <map:parameter name="format" value="{1}" />
         </map:transform>
-        <map:transform type="xinclude"/>
-        <map:serialize/>
+        <map:transform type="cinclude" />
+        <map:serialize />
       </map:match>
+    </map:pipeline>
+    <map:pipeline>
       <!--
-      Aggregate the forrest:properties requested by the *.fv.
-      The result is an aggregation of properties which defines the templates to be call.
-      {1} - format
-      {2} - requested url
+        Aggregate the forrest:properties requested by the *.fv.
+        The result is an aggregation of properties which defines the templates to be call.
+        {1} - format
+        {2} - requested url
       -->
-      <map:match pattern="prepare.properties.*.**">
-        <map:generate src="cocoon:/prepare.view.{2}"/>
-        <map:transform src="resources/stylesheets/prepare.properties.xsl">
-          <!--Which output format?-->
-          <map:parameter name="format" value="{1}"/>
-        </map:transform>
-        <map:transform type="xinclude"/>
-        <map:serialize/>
-      </map:match>
-      <!--FIXME
-      This has to be an interface and not an implementation. Use lm to do it.
-      
-      An interface will only generate cocoon protocol matches and serialize them!
-      An implementation will deliver the actual match (including transformation)-->
-      <!--
-      Aggregate all contracts-templates requested by the view.
-      Create a xsl that can be used for the last step of the transformation of the view.
-      {1} - format
-      {2} - requested url
+      <map:match pattern="prepare.structurer-properties.*.**">
+        <map:generate src="{lm:structurer.{2}}" />
+        <map:transform src="{lm:structurer-properties-includes.xsl}">
+          <map:parameter name="format" value="{1}" />
+        </map:transform>
+        <map:transform type="cinclude" />
+        <map:serialize />
+      </map:match>
+    </map:pipeline>
+    <map:pipeline>
+    <!--
+        Aggregate all contracts-templates requested by the view.
+        Create a xsl that can be used for the last step of the transformation of the view.
+        {1} - format
+        {2} - requested url
       -->
-      <map:match pattern="getStylesheet.*.**">
+      <map:match pattern="structurer-xsl.*.**">
         <map:aggregate element="filter">
-          <map:part src="cocoon://prepare.view-nugget.{2}" />
-          <map:part src="cocoon://prepare.properties.{1}.{2}" />
+          <map:part src="{lm:structurer.{2}}" />
+          <map:part src="{lm:structurer-properties.{1}.{2}}" />
         </map:aggregate>
-        <map:transform src="resources/stylesheets/prepare.{1}.xsl" >
-          <map:parameter name="request" value="{2}"/>
-          <map:parameter name="forrestContext" value="{forrest:context}"/>
+        <map:transform src="{lm:structurer-final-xsl-{1}.xsl}">
+          <map:parameter name="request" value="{2}" />
+          <map:parameter name="forrestContext"
+            value="{forrest:context}" />
         </map:transform>
-        <map:transform type="xinclude"/>
-        <map:serialize/>
+        <map:serialize />
+      </map:match>
+    </map:pipeline>
+
+    <map:pipeline>
+      <!-- DO NOT USE ANYMORE
+        FIXME: Finish rewriting move to lm ->  del if finished-->
+      <map:match pattern="prepare.view.**">
+        <map:generate src="cocoon:/prepare.structurer.{1}" />
+        <map:serialize />
+      </map:match>
+      <map:match pattern="prepare.view-nugget.**">
+        <map:generate src="cocoon:/prepare.structurer.{1}" />
+        <map:serialize />
+      </map:match>
+      <map:match pattern="prepare.include.*.**">
+        <map:generate src="cocoon:/prepare.structurer-xsl.{1}.{2}" />
+        <map:serialize />
+      </map:match>
+      <map:match pattern="prepare.properties.*.**">
+        <map:generate
+          src="cocoon:/prepare.structurer-properties.{1}.{2}" />
+        <map:serialize />
+      </map:match>
+      <map:match pattern="getStylesheet.*.**">
+        <map:generate
+          src="cocoon:/structurer-xsl.{1}.{2}" />
+        <map:serialize />
       </map:match>
     </map:pipeline>
   </map:pipelines>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.include.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.include.xsl?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.include.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.include.xsl
Thu Oct 13 03:19:07 2005
@@ -19,7 +19,7 @@
 <xsl:stylesheet version="1.0" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:forrest="http://apache.org/forrest/templates/1.0"  
-  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:c="http://apache.org/cocoon/include/1.0"
   xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias">
     <xsl:namespace-alias 
          stylesheet-prefix="alias" result-prefix="xsl"/>
@@ -35,7 +35,12 @@
       <xsl:for-each 
         select="forrest:views/forrest:view[@type=$format]//forrest:contract[count(. | key('contract-name',
@name)[1]) = 1]">
         <xsl:sort select="@name" />
-        <xi:include href="cocoon://get.contract.{@name}.{$format}"/>
+        <c:include>
+          <xsl:attribute name="src">
+            <xsl:value-of 
+              select="concat('cocoon://get.contract.',@name,'.', $format)"/>
+          </xsl:attribute>
+        </c:include>
       </xsl:for-each>
     </alias:stylesheet>
   </xsl:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.properties.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.properties.xsl?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.properties.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.properties.xsl
Thu Oct 13 03:19:07 2005
@@ -19,15 +19,19 @@
 <xsl:stylesheet version="1.0" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:forrest="http://apache.org/forrest/templates/1.0"  
-  xmlns:xi="http://www.w3.org/2001/XInclude"
-  >
+  xmlns:c="http://apache.org/cocoon/include/1.0" >
 
 	<xsl:param name="format"/>
 
   <xsl:template match="/">
     <forrest:properties >
 	    <xsl:for-each select="forrest:views/forrest:view[@type=$format]//forrest:contract">
-	      <xi:include href="cocoon://get.contract-property.{@name}.{$format}"/>
+        <c:include>
+          <xsl:attribute name="src">
+            <xsl:value-of 
+              select="concat('cocoon://get.contract-property.',@name,'.', $format)"/>
+          </xsl:attribute>
+        </c:include>
 	    </xsl:for-each>
     </forrest:properties>
   </xsl:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.xhtml.xsl?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.xhtml.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/prepare.xhtml.xsl
Thu Oct 13 03:19:07 2005
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 
-<xsl:stylesheet version="1.0" xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias"
xmlns:forrest="http://apache.org/forrest/templates/1.0" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0" xmlns:alias="http://www.w3.org/1999/XSL/TransformAlias"
xmlns:forrest="http://apache.org/forrest/templates/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:namespace-alias result-prefix="xsl" stylesheet-prefix="alias"/>
     <!--Include forrest:hook matchers-->
     <xsl:include href="hooksMatcher.xsl"/>
@@ -25,7 +25,7 @@
     <xsl:key name="head-template" match="forrest:property[@format='xhtml']" use="@name"
/>
     <xsl:key name="css-includes" match="forrest:css" use="@url" />
     <xsl:template match="/">
-    	<!--Create the final stylesheet (alias:)-->
+    	<!--Create the final stylesheet (alias:) resources/stylesheets/structurer-tiles-root-strip.xsl
-->
         <alias:stylesheet version="1.0">
             <alias:import href="file:{$forrestContext}/skins/common/xslt/html/site2xhtml.xsl"/>

             <alias:import href="file:{$forrestContext}/skins/common/xslt/html/dotdots.xsl"/>

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/root-strip.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/root-strip.xsl?rev=320710&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/root-strip.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/root-strip.xsl
Thu Oct 13 03:19:07 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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:forrest="http://apache.org/forrest/templates/1.0">
+  
+  <xsl:template match="/">
+    <xsl:copy-of select="*/*"/>
+  </xsl:template>
+  
+</xsl:stylesheet>

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

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/acting/RecursiveDirectoryTraversalAction.java
(from r312912, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/plugin/internal/view/acting/RecursiveDirectoryTraversalAction.java)
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/acting/RecursiveDirectoryTraversalAction.java?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/acting/RecursiveDirectoryTraversalAction.java&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/plugin/internal/view/acting/RecursiveDirectoryTraversalAction.java&r1=312912&r2=320710&rev=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/plugin/internal/view/acting/RecursiveDirectoryTraversalAction.java
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/src/java/org/apache/forrest/structurer/acting/RecursiveDirectoryTraversalAction.java
Thu Oct 13 03:19:07 2005
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.forrest.plugin.internal.view.acting;
+package org.apache.forrest.structurer.acting;
 
 import java.io.IOException;
 import java.net.MalformedURLException;

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/output.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/output.xmap?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/output.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/output.xmap Thu
Oct 13 03:19:07 2005
@@ -56,21 +56,6 @@
         mime-type="text/html" name="xhtml" pool-grow="2" pool-max="64"
         pool-min="2"
         src="org.apache.cocoon.serialization.XMLSerializer">
-        <!--+
-          | You can choose from Strict, Transitional, or Frameset XHTML.
-          | For Strict XHTML set doctype to:
-          |   <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>
-          | For Transitional XHTML set doctype to:
-          |   <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
-          |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
-          | For Frameset XHTML set doctype to:
-          |   <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public>
-          |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</doctype-system>
-          |
-          | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than
one
-          | XHTML DTD simultaneously, you can define several XHTML serializers.
-          +-->
         <doctype-public>
           -//W3C//DTD XHTML 1.0 Strict//EN
         </doctype-public>
@@ -86,6 +71,18 @@
     </map:serializers>
   </map:components>
   <map:pipelines>
+        <!--
+ <map:pipeline>
+      <map:match pattern="test.**">
+        <map:generate src="status.xml" type="jx" />
+        <map:transform src="resources/stylesheets/temp.xsl">
+          <map:parameter name="test"
+            value="{lm:structurer-xsl-final-xhtml.xsl}" />
+        </map:transform>
+        <map:serialize />
+      </map:match>
+    </map:pipeline>
+    -->
     <!--
       This plugin provides a theme implementation based on views
     -->
@@ -133,7 +130,9 @@
         </map:select>
         <map:serialize type="xml" />
       </map:match>
-      <!--This activates forrest:call-templates includes into the view.-->
+      <!--This activates forrest:call-templates includes into the view.
+        del-after refactor!
+        -->
       <map:match pattern="prepare.view-templates.**">
         <map:select type="exists">
           <map:when

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/templates/export-link.vt.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/templates/export-link.vt.xml?rev=320710&r1=320709&r2=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/templates/export-link.vt.xml
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/templates/export-link.vt.xml
Thu Oct 13 03:19:07 2005
@@ -16,9 +16,16 @@
 limitations under the License.
 -->
 
-<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" >
+<forrest:template 
+    xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <forrest:hook name="export-link">
     <forrest:contract name="content-source-xml-link"/>
     <forrest:contract name="content-pdf-link"/>
+    <!-- You can include other templates from tiles as well -->
+    <!--<jx:import uri="cocoon://prepare.structurer-tiles.export-link-test"/>-->
+    <!-- FIXME: jxpath -->
+    <!-- Use this when jxpath bug is solved -->
+    <!--<jx:import uri="lm:tiles.export-link-test"/>-->
   </forrest:hook>
 </forrest:template>

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/default.fv
(from r320703, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/default.fv)
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/default.fv?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/default.fv&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/default.fv&r1=320703&r2=320710&rev=320710&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/views/default.fv
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themes/resources/views/default.fv
Thu Oct 13 03:19:07 2005
@@ -24,7 +24,7 @@
     <forrest:contract name="siteinfo-meta">
       <forrest:properties contract="siteinfo-meta">
         <forrest:property name="siteinfo-meta" nugget="get.build.info">
-          <url>build-info</url>
+          <jx:import uri="cocoon://build-info"/>
         </forrest:property>
       </forrest:properties>
     </forrest:contract>
@@ -40,14 +40,14 @@
           <forrest:contract name="nav-main">
             <forrest:properties contract="nav-main">
               <forrest:property name="nav-main" nugget="get.navigation">
-                <url>${cocoon.parameters.getRequest}.navigation.xml</url>
+                <jx:import uri="cocoon://${cocoon.parameters.getRequest}.navigation.xml"/>
               </forrest:property>
             </forrest:properties>
           </forrest:contract>
           <forrest:contract name="nav-main-sub">
             <forrest:properties contract="nav-main-sub">
               <forrest:property name="nav-main-sub" nugget="get.navigation">
-                <url>#{$cocoon/parameters/getRequest}.navigation.xml</url>
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
               </forrest:property>
             </forrest:properties>
           </forrest:contract>
@@ -58,7 +58,7 @@
           <forrest:contract name="nav-section">
             <forrest:properties contract="nav-section">
               <forrest:property name="nav-section" nugget="get.navigation">
-                <url>#{$cocoon/parameters/getRequest}.navigation.xml</url>
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
               </forrest:property>
             </forrest:properties>
           </forrest:contract>
@@ -76,30 +76,42 @@
   <forrest:contract name="content-xml-link"/>
   <forrest:contract name="content-pdf-link"/>
 </forrest:hook>
- can be called as <forrest:call-template name="export-link"/>
- when saved as {project:resources}/templates/export-link.vt.xml 
+ can be called as  <jx:import uri="cocoon://prepare.tiles.export-link"/>
+ when saved as 
+ {project:resources}/templates/{project:theme}/export-link.vt.xml 
+ or
+ {project:resources}/templates/export-link.vt.xml
+ 
+HEADSUP:
+<forrest:call-template name="export-link"/> is *not* working anymore!!!
 -->
-        <forrest:call-template name="export-link"/>
+        <jx:import uri="cocoon://prepare.tiles.export-link"/>
+        <!-- FIXME: jxpath -->
+        <!-- Use this when jxpath bug is solved -->
+        <!--<jx:import uri="lm:tiles.export-link"/>-->
 
         <forrest:hook name="content">
           <forrest:contract name="content-title">
             <forrest:properties contract="content-title">
               <forrest:property name="content-title" nugget="get.body">
-                <url>#{$cocoon/parameters/getRequest}.body.xml</url>
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.body.xml"/>
+                <!-- FIXME: move to new matching -->
+                <!-- we should request this via lm. We should enable #xpointer(/*/*) generating
for the title-->
+                <!--<jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.body.xml"/>-->
               </forrest:property>
             </forrest:properties>
           </forrest:contract>
           <forrest:contract name="content-abstract">
             <forrest:properties contract="content-abstract">
               <forrest:property name="content-abstract" nugget="get.abstract">
-                <url>#{$cocoon/parameters/getRequest}.abstract.xml</url>
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.abstract.xml"/>
               </forrest:property>
             </forrest:properties>
           </forrest:contract>
           <forrest:contract name="content-minitoc">
             <forrest:properties contract="content-minitoc">
               <forrest:property name="content-minitoc-toc" nugget="get.toc">
-                <url>#{$cocoon/parameters/getRequest}.toc.xml</url>
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
               </forrest:property>
               <forrest:property name="content-minitoc-conf" >
                 <toc max-depth="2" 
@@ -110,7 +122,7 @@
           <forrest:contract name="content-main">
             <forrest:properties contract="content-main">
               <forrest:property name="content-main" nugget="get.body">
-                <url>#{$cocoon/parameters/getRequest}.body.xml</url>
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.body.xml"/>
               </forrest:property>
             </forrest:properties>
           </forrest:contract>



Mime
View raw message