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 2005/09/18 23:08:39 UTC

svn commit: r289974 - in /forrest/trunk/whiteboard/plugins: org.apache.forrest.plugin.internal.view/ org.apache.forrest.plugin.internal.view/resources/stylesheets/common/ org.apache.forrest.plugin.internal.view/resources/stylesheets/common/css/ org.apa...

Author: thorsten
Date: Sun Sep 18 14:07:48 2005
New Revision: 289974

URL: http://svn.apache.org/viewcvs?rev=289974&view=rev
Log:
Refactored views to request the presentation model instead of passing it as default to the processing~

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/menu.xmap
      - copied unchanged from r280338, forrest/trunk/main/webapp/menu.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/
      - copied from r280939, forrest/trunk/main/webapp/skins/common/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/css/
      - copied from r289971, forrest/trunk/main/webapp/skins/common/css/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/images/
      - copied from r289971, forrest/trunk/main/webapp/skins/common/images/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/scripts/
      - copied from r289971, forrest/trunk/main/webapp/skins/common/scripts/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/skinconf.xsl
      - copied unchanged from r289971, forrest/trunk/main/webapp/skins/common/skinconf.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/translations/
      - copied from r289971, forrest/trunk/main/webapp/skins/common/translations/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/common/xslt/
      - copied from r289971, forrest/trunk/main/webapp/skins/common/xslt/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/
      - copied from r280338, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/book2menu.xsl
      - copied, changed from r289971, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/book2menu.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/document2html.xsl
      - copied, changed from r289971, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/document2html.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/tab2menu.xsl
      - copied, changed from r289971, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/tab2menu.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/tabs.xmap
      - copied, changed from r280338, forrest/trunk/main/webapp/tabs.xmap
Removed:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/site2xhtml.xsl
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main-sub.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-section.ft

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap?rev=289974&r1=289973&r2=289974&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap Sun Sep 18 14:07:48 2005
@@ -17,79 +17,111 @@
 -->
 <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:pipes>
-		<map:selectors>
-      <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: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:pipes>
+  <map:selectors>
+    <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" 
+      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>
+  </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: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" 
+      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>
+      <encoding>UTF-8</encoding>
+    </map:serializer>
+    <map:serializer name="text" 
+        src="org.apache.cocoon.serialization.TextSerializer"
+        mime-type="text/plain" 
+        logger="sitemap.serializer.text" 
       />
-      <map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator" />
-      <!--FIXME: type="jx" -->
-      <!-- <map:generator label="content" logger="sitemap.generator.jx" name="jx" pool-max="16" src="org.apache.cocoon.template.JXTemplateGenerator"/> -->
-    </map:generators>
-    <map:transformers default="xslt">
-      <map:transformer name="cinclude"
-        src="org.apache.cocoon.transformation.CIncludeTransformer"/>
-      <map:transformer name="xinclude"
-        src="org.apache.cocoon.transformation.XIncludeTransformer"/>
-    </map:transformers>
-    <map:serializers>
-	   <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>
-	      <encoding>UTF-8</encoding>
-	    </map:serializer>
-      <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" 
+  </map:serializers>
+  <map:actions>
+    <map:action name="fallbackResolverAction" 
         src="org.apache.forrest.plugin.internal.view.acting.FallbackResolverAction"/>
-    </map:actions>
-  </map:components>
+  </map:actions>
+</map:components>
+  <map:resources>
+    <map:resource name="skinit">
+      <map:select type="exists">
+        <map:when test="{project:skins-dir}/xslt/html/{type}.xsl">
+          <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
+            <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:transform>
+        </map:when>
+        <map:otherwise>
+          <map:transform src="resources/stylesheets/html/{type}.xsl">
+            <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:transform>
+        </map:otherwise>
+      </map:select>
+      <map:serialize/>
+    </map:resource>
+  </map:resources>
 
 <map:pipelines>
-
-<!--
+  <!--
   This plugin has x components:
   2. businessHelper - delivers content that is used in the contracts
   3. views - transforms the requested contracts (viewHelper) 
      and populate them with the content (businessHelper)
   -->
-
-
-
-<!--
+  <!--
   3. views
   prepares and transforms the requested contracts (viewHelper) and populate them with the content (businessHelper).
   -->
@@ -103,17 +135,15 @@
         <!--<map:parameter name="include" value="[\w]*.fv"/>-->
       </map:generate>
       <map:transform src="resources/stylesheets/viewLocationmap.xsl"/>
-    	<map:serialize type="xml"/>
+      <map:serialize/>
     </map:match>
-    
-
-  <!--FIXME: type="jx" 
+    <!--FIXME: type="jx" 
     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
     -->
-    <map:match pattern="prepare.view.**">
+    <map:match pattern="prepare.jxWorkaround.**">
       <map:act type="fallbackResolverAction">
         <map:parameter value="{1}" name="request"/>
         <map:parameter value="{project:theme}" name="projectFallback"/>
@@ -122,27 +152,34 @@
         <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="file:/{uri}"/>
-        <map:transform src="resources/stylesheets/prepare.include.templates.xsl"/>
+        <map:generate src="{uri}"/>
+        <map:transform 
+          src="resources/stylesheets/prepare.include.templates.xsl"/>
         <map:transform type="xinclude"/>
-        <map:serialize type="xml"/>
+        <map:serialize/>
       </map:act>
     </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: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: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:transform>
       <map:transform type="xinclude"/>
-     	<map:serialize type="xml"/>
+      <map:serialize/>
     </map:match>
-    
-<!--
+    <!--
   Aggregate the contract-templates requested by the view with xinclude.
   The result is a stylesheet with all needed xsl:templates.
   {1} - format
@@ -151,19 +188,18 @@
     <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}"/>
+        <map:parameter name="config-file" value="{project:skinconf}"/>
         <!--Which output format?-->
         <map:parameter name="format" value="{1}"/>
       </map:transform>
-      <map:transform type="xinclude"/> 
-     	<map:serialize type="xml"/>
+      <map:transform type="xinclude"/>
+      <map:serialize/>
     </map:match>
-    
     <!--
       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
+      {2} - requested url
       -->
     <map:match pattern="prepare.properties.*.**">
       <map:generate src="cocoon:/prepare.view.{2}"/>
@@ -172,7 +208,7 @@
         <map:parameter name="format" value="{1}"/>
       </map:transform>
       <map:transform type="xinclude"/>
-     	<map:serialize type="xml"/>
+      <map:serialize/>
     </map:match>
     <!--FIXME
       This has to be an interface and not an implementation
@@ -184,58 +220,92 @@
       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:aggregate element="filter">
         <map:part src="cocoon://prepare.view-nugget.{2}" />
-        <map:part src="cocoon://prepare.properties.{1}.{2}" /> 
+        <map:part src="cocoon://prepare.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:parameter name="forrestContext" value="{forrest:context}"/>
       </map:transform>
-      <map:transform type="xinclude"/> 
-     	<map:serialize type="xml"/>
+      <map:transform type="xinclude"/>
+      <map:serialize/>
     </map:match>
   </map:pipeline>
-  
   <!--
   2. businessHelper
   This is the model producing factory.
   -->
-<!--NOTE: 
+  <!--NOTE: 
   The current factory uses the models the skin (e.g. document2xhtml.xsl from pelt [default skin]).
   It is only exchanging the last model of the models the skin is producing (site2xhtml.xsl) till now.
   This will have to be changed in the future.
-  -->  
+  -->
   <map:pipeline>
     <map:match pattern="*.page">
       <map:aggregate element="site">
         <map:part src="cocoon://skinconf.xml"/>
-        <map:part src="cocoon://tab-{1}.html"/>
-        <map:part src="cocoon://menu-{1}.html"/>
+        <!--<map:part src="cocoon://tab-{1}.html"/>
+        <map:part src="cocoon://menu-{1}.html"/>-->
         <map:part src="cocoon://body-{1}.html"/>
         <map:part src="cocoon:/prepare.view-nugget.{1}"/>
       </map:aggregate>
-      <map:serialize type="xml"/>
+      <map:serialize/>
     </map:match>
     <map:match pattern="**/*.page">
       <map:aggregate element="site">
         <map:part src="cocoon://skinconf.xml"/>
-        <map:part src="cocoon://{1}/tab-{2}.html"/>
-        <map:part src="cocoon://{1}/menu-{2}.html"/>
+        <!--<map:part src="cocoon://{1}/tab-{2}.html"/>
+        <map:part src="cocoon://{1}/menu-{2}.html"/>-->
         <map:part src="cocoon://{1}/body-{2}.html"/>
         <map:part src="cocoon:/prepare.view-nugget.{1}/{2}"/>
       </map:aggregate>
-      <map:serialize type="xml"/>
+      <map:serialize/>
+    </map:match>
+  </map:pipeline>
+  <!-- 
+  2. businessHelper
+  -->
+  <map:pipeline>
+    <map:match pattern="*.navigation.xml">
+      <map:aggregate element="navigation">
+        <map:part src="cocoon:/tab-{1}.html" element="tab"/>
+        <map:part src="cocoon:/menu-{1}.html" element="menu"/>
+      </map:aggregate>
+      <map:serialize/>
     </map:match>
-      
-  </map:pipeline>  
 
-  
-<!-- 
-	2. businessHelper
-	-->
-  
- </map:pipelines>
+    <map:match pattern="**/*.navigation.xml">
+      <map:aggregate element="navigation">
+	      <map:part src="cocoon:/{1}/tab-{2}.html" element="tab"/>
+        <map:part src="cocoon:/{1}/menu-{2}.html" element="menu"/>
+      </map:aggregate>
+      <map:serialize/>
+    </map:match>
+
+      <map:match pattern="**book-*.html">
+        <map:mount uri-prefix="" src="menu.xmap" check-reload="yes" />
+      </map:match>
+
+    <map:match pattern="**menu-*.html">
+	    <map:generate src="cocoon:/{1}book-{2}.html"/>
+
+	    <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.html"/>
+	    <!--<map:serialize/>-->
+
+        <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+        <map:call resource="skinit">
+          <map:parameter name="type" value="book2menu"/>
+          <map:parameter name="path" value="{1}{2}.html"/>
+        </map:call>
+</map:match>
+
+<map:match pattern="**tab-*.html">
+        <map:mount uri-prefix="" src="tabs.xmap" check-reload="yes" />
+</map:match>
+
+  </map:pipeline>
+</map:pipelines>
 </map:sitemap>

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/book2menu.xsl (from r289971, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/book2menu.xsl)
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/book2menu.xsl?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/book2menu.xsl&p1=forrest/trunk/main/webapp/skins/leather-dev/xslt/html/book2menu.xsl&r1=289971&r2=289974&rev=289974&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/leather-dev/xslt/html/book2menu.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/book2menu.xsl Sun Sep 18 14:07:48 2005
@@ -22,7 +22,7 @@
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-  <xsl:import href="../../../common/xslt/html/book2menu.xsl"/>
+	<xsl:import href="../common/xslt/html/book2menu.xsl"/>
 
   <xsl:template match="book">
     <div id="menu">

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/document2html.xsl (from r289971, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/document2html.xsl)
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/document2html.xsl?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/document2html.xsl&p1=forrest/trunk/main/webapp/skins/leather-dev/xslt/html/document2html.xsl&r1=289971&r2=289974&rev=289974&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/leather-dev/xslt/html/document2html.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/document2html.xsl Sun Sep 18 14:07:48 2005
@@ -22,7 +22,7 @@
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-  <xsl:import href="../../../common/xslt/html/document2html.xsl"/>
+	<xsl:import href="../common/xslt/html/document2html.xsl"/>
 
   <xsl:template match="document">
     <div id="content">

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/tab2menu.xsl (from r289971, forrest/trunk/main/webapp/skins/leather-dev/xslt/html/tab2menu.xsl)
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/tab2menu.xsl?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/tab2menu.xsl&p1=forrest/trunk/main/webapp/skins/leather-dev/xslt/html/tab2menu.xsl&r1=289971&r2=289974&rev=289974&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/leather-dev/xslt/html/tab2menu.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/html/tab2menu.xsl Sun Sep 18 14:07:48 2005
@@ -41,7 +41,7 @@
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-  <xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
+	<xsl:import href="../common/xslt/html/tab2menu.xsl"/>
 
   <xsl:template match="tabs">
   	<ul id="nav-main">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv?rev=289974&r1=289973&r2=289974&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv Sun Sep 18 14:07:48 2005
@@ -16,7 +16,9 @@
 limitations under the License.
 -->
 
-<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" >
+<forrest:views 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <forrest:view type="xhtml">
     <forrest:css url="default.css"/>
     <forrest:contract name="siteinfo-meta">
@@ -35,13 +37,31 @@
           </forrest:properties>
         </forrest:contract>
         <forrest:hook name="nav-main-hook">
-          <forrest:contract name="nav-main"/>
-          <forrest:contract name="nav-main-sub"/>
+          <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>
+              </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>
+					    </forrest:property>
+					  </forrest:properties>
+					</forrest:contract>
         </forrest:hook>
       </forrest:hook>
       <forrest:hook name="page">
         <forrest:hook name="leftbar">
-          <forrest:contract name="nav-section"/>
+          <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>
+					    </forrest:property>
+					  </forrest:properties>
+					</forrest:contract>
           <forrest:contract name="search-input"/>
         </forrest:hook>
 <!-- 

Copied: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/tabs.xmap (from r280338, forrest/trunk/main/webapp/tabs.xmap)
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/tabs.xmap?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/tabs.xmap&p1=forrest/trunk/main/webapp/tabs.xmap&r1=280338&r2=289974&rev=289974&view=diff
==============================================================================
--- forrest/trunk/main/webapp/tabs.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/tabs.xmap Sun Sep 18 14:07:48 2005
@@ -40,7 +40,7 @@
   <map:resources>
     <map:resource name="skinit">
       <map:select type="exists">
-        <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
+        <map:when test="{project:skins-dir}/xslt/html/{type}.xsl">
           <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
             <map:parameter name="notoc" value="{notoc}"/>
             <!-- FIXME: do we need this anymore? -->
@@ -52,7 +52,7 @@
           </map:transform>
         </map:when>
         <map:otherwise>
-          <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
+          <map:transform src="resources/stylesheets/html/{type}.xsl">
             <map:parameter name="notoc" value="{notoc}"/>
             <!-- For backwards-compat with 0.2 - 0.4 skins -->
             <map:parameter name="isfaq" value="{notoc}"/>
@@ -92,7 +92,7 @@
             </map:act>
           </map:when>
         </map:select>
-        <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
+        <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.html"/>
         <map:call resource="skinit">
           <map:parameter name="type" value="tab2menu"/>
           <map:parameter name="path" value="{1}{2}.html"/>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap?rev=289974&r1=289973&r2=289974&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap Sun Sep 18 14:07:48 2005
@@ -75,7 +75,7 @@
 			 />
     </map:serializers>
   </map:components>
-<map:pipelines>
+  <map:pipelines>
 
 <!--
   This plugin provides a skin implementation based on views

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main-sub.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main-sub.ft?rev=289974&r1=289973&r2=289974&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main-sub.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main-sub.ft Sun Sep 18 14:07:48 2005
@@ -20,14 +20,21 @@
   <description>
     nav-main-sub will output the secondary navigation AKA level2.
   </description>
-  <usage><![CDATA[<forrest:contract name="nav-main-sub"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="nav-main-sub">
+  <forrest:properties contract="nav-main-sub">
+    <forrest:property name="nav-main-sub" nugget="get.navigation">
+      <url>${cocoon.parameters.request}.navigation.xml</url>
+    </forrest:property>
+  </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   format="xhtml" name="nav-main-sub" inputFormat="xsl" body="true" head="false">
 
     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 		  <xsl:template name="nav-main-sub-body">
-		     <xsl:apply-templates select="div[@id='nav-main-sub']/*"/>
+        <xsl:param name="nav-main-sub" select="'test'"/>
+		     <xsl:apply-templates select="$nav-main-sub/navigation/tab/div[@id='nav-main-sub']/*"/>
 		  </xsl:template>
 		</xsl:stylesheet>
 	</forrest:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main.ft?rev=289974&r1=289973&r2=289974&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-main.ft Sun Sep 18 14:07:48 2005
@@ -20,7 +20,13 @@
   <description>
     nav-main will output the main or primary navigation AKA tabs.
   </description>
-  <usage><![CDATA[<forrest:contract name="nav-main"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="nav-main">
+  <forrest:properties contract="nav-main">
+    <forrest:property name="nav-main" nugget="get.navigation">
+      <url>${cocoon.parameters.request}.navigation.xml</url>
+    </forrest:property>
+  </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   format="xhtml" name="nav-main" inputFormat="xsl" body="true" head="false">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-section.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-section.ft?rev=289974&r1=289973&r2=289974&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-section.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/nav-section.ft Sun Sep 18 14:07:48 2005
@@ -20,7 +20,13 @@
   <description>
     nav-section will output the navigation to pages within the current site section AKA menu
   </description>
-  <usage><![CDATA[<forrest:contract name="nav-section"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="nav-section">
+  <forrest:properties contract="nav-section">
+    <forrest:property name="nav-section" nugget="get.navigation">
+      <url>${cocoon.parameters.request}.navigation.xml</url>
+    </forrest:property>
+  </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   format="xhtml" name="nav-section" inputFormat="xsl" body="true" head="false">
@@ -28,24 +34,28 @@
     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 		  
 		  <xsl:template name="nav-section-body">
+        <xsl:param name="nav-section" select="'test'"/>
 <xsl:comment>+
     |start menu
     +</xsl:comment>
-            <xsl:if test="div[@id='menu']/ul/li">
-              <xsl:call-template name="menu"/>
+            <xsl:if test="$nav-section/navigation/menu/div[@id='menu']/ul/li">
+              <xsl:call-template name="menu">
+                <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
+              </xsl:call-template>
             </xsl:if>
 <xsl:comment>+
     |end menu
     +</xsl:comment>
 		  </xsl:template>
       <xsl:template name="menu">
+        <xsl:param name="root" value="'test'"/>
 <xsl:comment>+
     |start Menu
     +</xsl:comment>
    	<div id="nav-section">
 			<ul>
 <!--menu - inner-->	
-        <xsl:for-each select = "div[@id='menu']/ul/li">
+        <xsl:for-each select = "$root/div[@id='menu']/ul/li">
           <xsl:call-template name = "innermenuli" >
               <xsl:with-param name="id" select="concat('1.', position())"/>
           </xsl:call-template>