forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r280280 - in /forrest/trunk/whiteboard/plugins: org.apache.forrest.plugin.internal.view/ org.apache.forrest.plugin.internal.view/lib/ org.apache.forrest.plugin.internal.view/resources/stylesheets/ org.apache.forrest.plugin.internal.view/res...
Date Mon, 12 Sep 2005 07:39:00 GMT
Author: thorsten
Date: Mon Sep 12 00:38:43 2005
New Revision: 280280

URL: http://svn.apache.org/viewcvs?rev=280280&view=rev
Log:
Started to refactor existing contracts and internal pipeline like described in http://marc.theaimsgroup.com/?l=forrest-dev&m=112616664615538&w=2.
Added JX generator again but in comments because it not yet working. Formated some files.

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/lib/cocoon-template-block.jar
  (with props)
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/internal.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.view.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta.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=280280&r1=280279&r2=280280&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
Mon Sep 12 00:38:43 2005
@@ -36,6 +36,8 @@
         pool-max="16"
       />
       <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"
@@ -105,7 +107,7 @@
     </map:match>
     
 
-  <!--
+  <!--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.
@@ -208,27 +210,25 @@
   -->  
   <map:pipeline>
     <map:match pattern="*.page">
-				<map:aggregate element="site">
-          <map:part src="cocoon://skinconf.xml"/>
-          <map:part src="cocoon://build-info"/>
-          <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: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://body-{1}.html"/>
+        <map:part src="cocoon:/prepare.view-nugget.{1}"/>
+      </map:aggregate>
+      <map:serialize type="xml"/>
     </map:match>
     <map:match pattern="**/*.page">
-        <map:aggregate element="site">
-          <map:part src="cocoon://skinconf.xml"/>
-          <map:part src="cocoon://build-info"/>
-          <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:match>
+      <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}/body-{2}.html"/>
+        <map:part src="cocoon:/prepare.view-nugget.{1}/{2}"/>
+      </map:aggregate>
+      <map:serialize type="xml"/>
+    </map:match>
       
   </map:pipeline>  
 

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/lib/cocoon-template-block.jar
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/lib/cocoon-template-block.jar?rev=280280&view=auto
==============================================================================
Binary file - no diff available.

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/lib/cocoon-template-block.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.view.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.view.xsl?rev=280280&r1=280279&r2=280280&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.view.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.view.xsl
Mon Sep 12 00:38:43 2005
@@ -16,17 +16,15 @@
   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"  
-  xmlns:xi="http://www.w3.org/2001/XInclude"
+<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:alias="http://www.w3.org/1999/XSL/TransformAlias">
-    <xsl:namespace-alias 
-         stylesheet-prefix="alias" result-prefix="xsl"/>
-<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
+
+  <xsl:namespace-alias stylesheet-prefix="alias" result-prefix="xsl"/>
   <xsl:strip-space elements="forrest:property"/>
-  
- <xsl:param name="view"/>
+
+  <xsl:param name="view"/>
 
   <xsl:template match="/">
     <xsl:apply-templates/>
@@ -37,17 +35,17 @@
       <xsl:attribute name="name">
         <xsl:value-of select="@name"/>
       </xsl:attribute>
-       <xsl:element name="xi:include">
-        <xsl:attribute name="href">cocoon://<xsl:value-of select="url/text()"/></xsl:attribute>
-       </xsl:element>
-	  </xsl:element>
+      <xsl:element name="xi:include">
+        <xsl:attribute name="href">cocoon://<xsl:value-of 
+          select="url/text()"/></xsl:attribute>
+      </xsl:element>
+    </xsl:element>
   </xsl:template>
 
   <xsl:template match="@*|*|text()|processing-instruction()|comment()">
     <xsl:copy>
-      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+      <xsl:apply-templates 
+        select="@*|*|text()|processing-instruction()|comment()"/>
     </xsl:copy>
   </xsl:template>
-  
-
 </xsl:stylesheet>

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=280280&r1=280279&r2=280280&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
Mon Sep 12 00:38:43 2005
@@ -17,49 +17,55 @@
 -->
 
 <forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" >
-    <forrest:view type="xhtml">
-        <forrest:css url="default.css"/>
-        <forrest:contract name="siteinfo-meta"/>
-        <forrest:hook name="container">
-            <forrest:hook name="header">
-              <forrest:contract name="branding-tagline">
-		            <forrest:properties contract="branding-tagline">
-								  <forrest:property name="branding-tagline-name">new seed</forrest:property>
-		              <forrest:property name="branding-tagline-tagline">powered by forrest:views</forrest:property>
-								 </forrest:properties>
-		          </forrest:contract>
-              <forrest:hook name="nav-main-hook">
-                <forrest:contract name="nav-main"/>
-              	<forrest:contract name="nav-main-sub"/>
-              </forrest:hook>
-            </forrest:hook>
-            <forrest:hook name="page">
-                <forrest:hook name="leftbar">
-                    <forrest:contract name="nav-section"/>
-                    <forrest:contract name="search-input"/>
-                </forrest:hook>
-                <!-- You can group elements to a template and call it from any view.
-	                e.g.
-	                <forrest:hook name="export-link">
-	                  <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 
-	              -->
-                <forrest:call-template name="export-link"/>
-                
-                <forrest:hook name="content">
-                    <forrest:contract name="content-title"/>
-                    <forrest:contract name="content-abstract"/>
-                    <forrest:contract name="content-minitoc"/>
-                    <forrest:contract name="content-main"/>
-                </forrest:hook>
-            </forrest:hook>
+  <forrest:view type="xhtml">
+    <forrest:css url="default.css"/>
+    <forrest:contract name="siteinfo-meta">
+      <forrest:properties contract="siteinfo-meta">
+        <forrest:property name="siteinfo-meta" nugget="get.build.info">
+          <url>build-info</url>
+        </forrest:property>
+      </forrest:properties>
+    </forrest:contract>
+    <forrest:hook name="container">
+      <forrest:hook name="header">
+        <forrest:contract name="branding-tagline">
+          <forrest:properties contract="branding-tagline">
+            <forrest:property name="branding-tagline-name">new seed</forrest:property>
+            <forrest:property name="branding-tagline-tagline">powered by forrest:views</forrest:property>
+          </forrest:properties>
+        </forrest:contract>
+        <forrest:hook name="nav-main-hook">
+          <forrest:contract name="nav-main"/>
+          <forrest:contract name="nav-main-sub"/>
         </forrest:hook>
-        <forrest:hook name="footer">
-            <forrest:contract name="siteinfo-feedback"/>
-            <forrest:contract name="siteinfo-last-published"/>
+      </forrest:hook>
+      <forrest:hook name="page">
+        <forrest:hook name="leftbar">
+          <forrest:contract name="nav-section"/>
+          <forrest:contract name="search-input"/>
         </forrest:hook>
-    </forrest:view>
+<!-- 
+ You can group elements to a template and call it from any view. e.g.
+<forrest:hook name="export-link">
+  <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 
+-->
+        <forrest:call-template name="export-link"/>
+
+        <forrest:hook name="content">
+          <forrest:contract name="content-title"/>
+          <forrest:contract name="content-abstract"/>
+          <forrest:contract name="content-minitoc"/>
+          <forrest:contract name="content-main"/>
+        </forrest:hook>
+      </forrest:hook>
+    </forrest:hook>
+    <forrest:hook name="footer">
+      <forrest:contract name="siteinfo-feedback"/>
+      <forrest:contract name="siteinfo-last-published"/>
+    </forrest:hook>
+  </forrest:view>
 </forrest:views>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv?rev=280280&r1=280279&r2=280280&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/pelt.fv
Mon Sep 12 00:38:43 2005
@@ -24,7 +24,13 @@
     <forrest:css url="pelt.screen.css" media="screen" title="Pelt"/>
     <forrest:css url="pelt.print.css" media="print"/>
     <forrest:css url="profile.css" media="screen" title="Pelt"/>
-    <forrest:contract name="siteinfo-meta"/>
+    <forrest:contract name="siteinfo-meta">
+      <forrest:properties contract="siteinfo-meta">
+        <forrest:property name="siteinfo-meta" nugget="get.build.info">
+          <url>build-info</url>
+        </forrest:property>
+      </forrest:properties>
+    </forrest:contract>
     <forrest:contract name="siteinfo-meta-navigation"/>
     <!-- FIXME - Cocoon problem with favicon.ico -->
     <!-- forrest:contract name="siteinfo-meta-icon"/ -->

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta.ft?rev=280280&r1=280279&r2=280280&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/siteinfo-meta.ft
Mon Sep 12 00:38:43 2005
@@ -20,24 +20,40 @@
   <description>
     This functions will output the html meta information. Implemented forrest version/skin
name.
   </description>
-  <usage><![CDATA[<forrest:contract name="siteinfo-meta"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="siteinfo-meta">
+    <forrest:properties contract="siteinfo-meta">
+      <forrest:property name="siteinfo-meta" nugget="get.build.info">
+        <url>build-info</url>
+      </forrest:property>
+    </forrest:properties>
+</forrest:contract>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   format="xhtml" name="siteinfo-meta" inputFormat="xsl" body="false" head="true">
     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 		  <xsl:template name="siteinfo-meta-head">
+        <xsl:param name="siteinfo-meta" select="'test'"/>
 		    <meta name="Generator" content="Apache Forrest"/>
 		    <meta name="Forrest-version">
 		      <xsl:attribute name="content">
-		        <xsl:value-of select="//info/forrest-version"/>
+		        <xsl:value-of select="$siteinfo-meta/info/forrest-version"/>
 		      </xsl:attribute>
 		    </meta>
 		    <meta name="Forrest-skin-name">
 		      <xsl:attribute name="content">
-		        <xsl:value-of select="//info/project-skin"/>
+		        <xsl:value-of select="$siteinfo-meta/info/project-skin"/>
 		      </xsl:attribute>
 		    </meta>
 		  </xsl:template>
+       <!--<xsl:template name="siteinfo-meta-body">
+        <xsl:param name="siteinfo-meta" select="'test'"/>
+        <xsl:copy-of select="$siteinfo-meta"/>xx
+        <p name="Forrest-skin-name">
+		      <xsl:attribute name="content">
+		        <xsl:value-of select="$siteinfo-meta/project-skin"/>
+		      </xsl:attribute>
+		    </p>
+        </xsl:template>-->
 		</xsl:stylesheet>
 	</forrest:template>
 </forrest:contract>



Mime
View raw message