forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r357262 - in /forrest/trunk/main/template-sites/v3: ./ forrest.properties src/documentation/content/xdocs/index.xml src/documentation/content/xdocs/tabs.xml src/documentation/resources/templates/ src/documentation/sitemap.xmap
Date Sat, 17 Dec 2005 00:47:49 GMT
Author: thorsten
Date: Fri Dec 16 16:47:41 2005
New Revision: 357262

URL: http://svn.apache.org/viewcvs?rev=357262&view=rev
Log:
added v3 as dispatcher refactoring seed. It is actually replacing the *.html output pipe of
the structurer with the new dispatcher transformer that makes it possible to request index.html
as usual.

Added:
    forrest/trunk/main/template-sites/v3/
      - copied from r357251, forrest/trunk/main/template-sites/basic/
Removed:
    forrest/trunk/main/template-sites/v3/src/documentation/resources/templates/
Modified:
    forrest/trunk/main/template-sites/v3/forrest.properties
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/index.xml
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/tabs.xml
    forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap

Modified: forrest/trunk/main/template-sites/v3/forrest.properties
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/forrest.properties?rev=357262&r1=357251&r2=357262&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/forrest.properties (original)
+++ forrest/trunk/main/template-sites/v3/forrest.properties Fri Dec 16 16:47:41 2005
@@ -24,17 +24,56 @@
 # Project name (used to name .war file)
 #project.name=my-project
 
-# Specifies name of Forrest skin to use
-# See list at http://forrest.apache.org/docs/skins.html
-#project.skin=pelt
-
-# codename: views
-# uncomment the following skin if you are using views
-#project.skin=leather-dev
-# views is using a fallback mechanism for theming.
-# You can configure the theme name and its extension here
-#project.theme-extension=.fv
-#project.theme=pelt
+#********************************************************
+# code name: dispatcher 
+#********************************************************
+# code name: themer
+#   views is using a fallback mechanism for theming.
+#   Themes are structured and transformed through templates. 
+#   You can configure the theme name and its extension here
+#####################################
+#   *theme* aka (also known as) {project:theme}
+# project.theme=default
+#   *theme-extension* aka {project:theme-ext}
+# project.theme-extension=.fv
+#####################################
+#  *description* 
+#  Forrest will resolve which (view-) template is responsible 
+#  for the request with the help of themes.
+#  
+#  If no (view-) template (first choice or fallback) can be found, 
+#  the structurer will return the default fallback 
+#  ({defaults:view-themes}/{defaults:theme}{defaults:theme-ext}).
+#
+# Example (common.fv):
+# 1.request: index 
+#  First choice: index.{project:theme-ext} = index.fv
+#  First/last fallback: {project:theme}{project:theme-ext} = common.fv
+# 
+# 2.request: sample/index 
+#  First choice: sample/index.fv 
+#  First fallback: sample/common.fv 
+#  Last fallback: common.fv
+# 
+# 3.request: sample/subdir/index 
+#  First choice: sample/subdir/index.fv 
+#  First fallback: sample/subdir/common.fv 
+#  Second fallback: sample/common.fv
+#  Last fallback: common.fv
+# ...
+# The parent (view-) template inherits to its children until a child
+# is overriding this template. This fallback templating can be 
+# used for directories (common.fv) and/or files (*.fv). 
+# That means that the root view is the
+# default view as long no other view can be found in the requested child.
+##########################################
+#   *advanced configuration* - you can specify which plugins you want
+#   use internal.
+#project.themer=${forrest.home}/build/plugins/org.apache.forrest.plugin.output.themer
+#project.stucturer=${forrest.home}/build/plugins/org.apache.forrest.plugin.internal.structurer
+
+# theme-dir this overtakes the functionality of the former skins-dir
+#project.theme-dir=${project.resources-dir}/themes
 
 # Descriptors for plugins and skins
 # comma separated list, file:// is supported
@@ -111,6 +150,9 @@
 # server, set to -Djava.awt.headless=true
 #forrest.jvmargs=
 
+# Debug forrest on PORT 8000
+ forrest.jvmargs=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+
 # The bugtracking URL - the issue number will be appended
 #project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
 #project.bugtracking-url=http://issues.apache.org/jira/browse/
@@ -131,11 +173,7 @@
 # a production environment it is recomended that you specify a known working 
 # version.
 # Run "forrest available-plugins" for a list of plug-ins currently available
-project.required.plugins=org.apache.forrest.plugin.output.pdf
-
-# codename: views
-# Add the following plugins to project.required.plugins when using views:
-#org.apache.forrest.plugin.input.viewHelper.xhtml.ls,org.apache.forrest.plugin.output.themer,org.apache.forrest.plugin.internal.structurer
+project.required.plugins=org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.output.themer,org.apache.forrest.plugin.internal.structurer
 
 # Proxy configuration
 # proxy.host=

Modified: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/index.xml?rev=357262&r1=357251&r2=357262&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/index.xml Fri Dec
16 16:47:41 2005
@@ -18,16 +18,12 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
 <document> 
   <header> 
-    <title>Welcome to MyProj</title> 
+    <title>Welcome to dispatcher testing area</title> 
   </header> 
   <body> 
     <section id="overview">
-      <title>Congratulations</title>
-      <p>You have successfully generated and rendered an <a
-          href="ext:forrest">Apache Forrest</a> site.
-        This page is from the blank site template. It is found in
-        <code>src/documentation/content/xdocs/index.xml</code>
-        Please edit it and replace this text with content of your own.</p>
+      <title>Dispatcher testing area</title>
+      <p>Welcome brave soul.</p>
     </section>
   </body>
 </document>

Modified: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/tabs.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/tabs.xml?rev=357262&r1=357251&r2=357262&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/tabs.xml (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/tabs.xml Fri Dec
16 16:47:41 2005
@@ -33,7 +33,10 @@
     be displayed when their parent tab is selected.    
   -->
 
-  <tab id="home" label="Home" dir="" indexfile="index.html"/>
+  <tab id="home" label="Home" dir="" indexfile="index.html">
+    <tab label="samples" href="#"/>
+    <tab label="tests" href="#"/>
+  </tab>
   <!-- Add new tabs here, eg:
   <tab label="How-Tos" dir="community/howto/"/>
   <tab label="XML Site" dir="xml-site/"/>

Modified: forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap?rev=357262&r1=357251&r2=357262&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/sitemap.xmap Fri Dec 16 16:47:41
2005
@@ -2,13 +2,13 @@
 <!--
   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
-
+  
+  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.
@@ -19,54 +19,79 @@
 
   <map:components>
     <map:actions>
-      <map:action logger="sitemap.action.sourcetype" name="sourcetype" src="org.apache.forrest.sourcetype.SourceTypeAction">
+      <map:action logger="sitemap.action.sourcetype" name="sourcetype"
+        src="org.apache.forrest.sourcetype.SourceTypeAction">
         <sourcetype name="hello-v1.0">
-          <document-declaration public-id="-//Acme//DTD Hello Document V1.0//EN" />
+          <document-declaration
+            public-id="-//Acme//DTD Hello Document V1.0//EN" />
         </sourcetype>
       </map:action>
-    </map:actions>   
-    
+    </map:actions>
+    <map:transformers default="xslt">
+      <map:transformer logger="sitemap.transformer.jx" name="jx"
+        pool-max="16"  src="org.apache.cocoon.transformation.JXTemplateTransformer" />
+      <map:transformer name="dispatcher"
+        src="org.apache.forrest.dispatcher.transformation.DispatcherTransformer" />
+    </map:transformers>
     <map:selectors default="parameter">
-	    <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector"
/>
+      <map:selector logger="sitemap.selector.parameter" name="parameter"
+        src="org.apache.cocoon.selection.ParameterSelector" />
     </map:selectors>
   </map:components>
-  
-  <map:resources>    
+
+  <map:resources>
     <map:resource name="transform-to-document">
       <map:act type="sourcetype" src="{src}">
         <map:select type="parameter">
-          <map:parameter name="parameter-selector-test" value="{sourcetype}" />
+          <map:parameter name="parameter-selector-test"
+            value="{sourcetype}" />
 
           <map:when test="hello-v1.0">
             <map:generate src="{project:content.xdocs}{../../1}.xml" />
-            <map:transform src="{project:resources.stylesheets}/hello2document.xsl" />
-            <map:serialize type="xml-document"/>
+            <map:transform
+              src="{project:resources.stylesheets}/hello2document.xsl" />
+            <map:serialize type="xml-document" />
           </map:when>
         </map:select>
       </map:act>
     </map:resource>
   </map:resources>
-  
- <map:pipelines>
-  <map:pipeline>
-    <map:match pattern="old_site/*.html">
-     <map:select type="exists">
-      <map:when test="{project:content}{1}.html">
-        <map:read src="{project:content}{1}.html" mime-type="text/html"/>
-        <!--
-          Use this instead if you want JTidy to clean up your HTML
-          <map:generate type="html" src="{project:content}/{0}" />
-          <map:serialize type="html"/>
-        -->
-      </map:when>
-     </map:select>
-   </map:match>
-  
-   <map:match pattern="**.xml">
-      <map:call resource="transform-to-document">
-        <map:parameter name="src" value="{project:content.xdocs}{1}.xml" />
-      </map:call>
-    </map:match>
-  </map:pipeline>
- </map:pipelines>
+
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="old_site/*.html">
+        <map:select type="exists">
+          <map:when test="{project:content}{1}.html">
+            <map:read src="{project:content}{1}.html"
+              mime-type="text/html" />
+            <!--
+              Use this instead if you want JTidy to clean up your HTML
+              <map:generate type="html" src="{project:content}/{0}" />
+              <map:serialize type="html"/>
+            -->
+          </map:when>
+        </map:select>
+      </map:match>
+      <map:match pattern="**.html">
+        <map:generate src="lm://resolve.structurer.{1}" />
+        <map:transform type="jx">
+          <map:parameter name="lenient-xpath" value="true" />
+          <map:parameter name="getRequest" value="{1}" />
+          <map:parameter name="getRequestExstension" value="html" />
+        </map:transform>
+        <map:transform type="dispatcher">
+          <map:parameter name="type" value="html" />
+          <map:parameter name="hooksTransformer"
+            value="lm://hooks-to-html.xsl" />
+        </map:transform>
+        <map:serialize type="html" />
+      </map:match>
+      <map:match pattern="**.xml">
+        <map:call resource="transform-to-document">
+          <map:parameter name="src"
+            value="{project:content.xdocs}{1}.xml" />
+        </map:call>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
 </map:sitemap>



Mime
View raw message