forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r164616 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/src/documentation/content/xdocs /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/stylesheets /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/templates
Date Mon, 25 Apr 2005 18:23:49 GMT
Author: thorsten
Date: Mon Apr 25 11:23:48 2005
New Revision: 164616

URL: http://svn.apache.org/viewcvs?rev=164616&view=rev
Log:
extended the plugins to allow and define other formats then xhtml. HEADSUP: with this commit
you need to redefine your *.fv and add forrest:views as root element.

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.include.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.properties.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.xhtml.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/src/documentation/content/xdocs/howItWork.xml
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/output.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/stylesheets/contract.property.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/templates/noFt.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=164616&r1=164615&r2=164616&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 Apr 25 11:23:48 2005
@@ -120,10 +120,12 @@
   Aggregate the contract-templates requested by the view with xinclude.
   The result is a stylesheet with all needed xsl:templates.
   -->
-    <map:match pattern="prepare.include.**">
-      <map:generate src="cocoon:/prepare.view.{1}"/>
+    <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}"/>
       </map:transform>
       <map:transform type="xinclude"/> 
      	<map:serialize type="xml"/>
@@ -133,9 +135,12 @@
       Aggregate the forrest:properties requested by the *.fv.
       The result is an aggregation of properties which defines the templates to be call.
       -->
-    <map:match pattern="prepare.properties.**">
-      <map:generate src="cocoon:/prepare.view.{1}"/>
-      <map:transform src="resources/stylesheets/prepare.properties.xsl"/>
+    <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 type="xml"/>
     </map:match>
@@ -143,13 +148,13 @@
       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.
   		--> 
-    <map:match pattern="prepare.xhtml.**">
+    <map:match pattern="prepare.*.**">
       <map:aggregate element="forrest:filter">
-        <map:part src="cocoon://prepare.view.{1}" />
-        <map:part src="cocoon://prepare.properties.{1}" /> 
+        <map:part src="cocoon://prepare.view.{2}" />
+        <map:part src="cocoon://prepare.properties.{1}.{2}" /> 
       </map:aggregate>
-      <map:transform src="resources/stylesheets/prepare.xhtml.xsl" >
-        <map:parameter name="request" value="{1}"/>
+      <map:transform src="resources/stylesheets/prepare.{1}.xsl" >
+        <map:parameter name="request" value="{2}"/>
       </map:transform>
       <map:transform type="xinclude"/> 
      	<map:serialize type="xml"/>
@@ -160,7 +165,7 @@
     <map:match pattern="skin/contracts-**.css">
       <map:aggregate element="forrest:css">
         <map:part src="cocoon://skinconf.xml" />
-        <map:part src="cocoon://prepare.properties.{1}" /> 
+        <map:part src="cocoon://prepare.properties.xhtml.{1}" /> 
       </map:aggregate>
       <map:transform src="resources/stylesheets/prepare.css.xsl" />
       <map:transform type="xinclude"/> 

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl
Mon Apr 25 11:23:48 2005
@@ -24,10 +24,12 @@
     <xsl:namespace-alias 
          stylesheet-prefix="alias" result-prefix="xsl"/>
 
+	<xsl:param name="format"/>
+
   <xsl:template match="/">
     <alias:stylesheet version="1.0">
-	    <xsl:for-each select="forrest:view//forrest:contract">
-	      <xi:include href="cocoon://get.contract.{@name}.xhtml"/>
+	    <xsl:for-each select="forrest:views/forrest:view[@type=$format]//forrest:contract">
+	      <xi:include href="cocoon://get.contract.{$format}.{@name}"/>
 	    </xsl:for-each>
     </alias:stylesheet>
   </xsl:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.properties.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.properties.xsl?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.properties.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.properties.xsl
Mon Apr 25 11:23:48 2005
@@ -22,11 +22,12 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   >
 
+	<xsl:param name="format"/>
 
   <xsl:template match="/">
     <forrest:properties >
-	    <xsl:for-each select="forrest:view//forrest:contract">
-	      <xi:include href="cocoon://get.contract-property.{@name}"/>
+	    <xsl:for-each select="forrest:views/forrest:view[@type=$format]//forrest:contract">
+	      <xi:include href="cocoon://get.contract-property.{$format}.{@name}"/>
 	    </xsl:for-each>
     </forrest:properties>
   </xsl:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.xhtml.xsl?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.xhtml.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.xhtml.xsl
Mon Apr 25 11:23:48 2005
@@ -26,7 +26,7 @@
             <alias:import href="cocoon://dotdots"/>
             <alias:import href="cocoon://pathutils"/>
             <alias:import href="cocoon://renderlogo"/>
-            <alias:include href="cocoon://prepare.include.{$request}"/>
+            <alias:include href="cocoon://prepare.include.xhtml.{$request}"/>
             <alias:param name="path"/>
             <xsl:comment>All xhtml head elements requested by the forrest:template</xsl:comment>
             <alias:template name="getHead">
@@ -36,7 +36,7 @@
             </alias:template>
             <xsl:comment>All xhtml body elements requested by the forrest:template</xsl:comment>
             <alias:template name="getBody">
-                <xsl:apply-templates select="/*/forrest:view"/>
+                <xsl:apply-templates select="/*/forrest:views/forrest:view"/>
             </alias:template>
         	<!--default entry point into the presentation model 'site'-->
             <alias:template match="site">
@@ -45,7 +45,7 @@
                         <alias:call-template name="getHead"/>
                     	<!--Test whether there is an own css implemention requested by the
view-->
                     	<!--*No* forrest:css found in the view-->
-                        <xsl:if test="not(/*/forrest:view/forrest:css)">
+                        <xsl:if test="not(/*/forrest:views/forrest:view/forrest:css)">
                             <link rel="stylesheet" type="text/css">
                                 <xsl:attribute name="href">{$root}skin/basic.css</xsl:attribute>
                             </link>
@@ -57,8 +57,8 @@
                             </link>
                         </xsl:if>
                     	<!-- forrest:css *found* in the view-->
-                        <xsl:if test="/*/forrest:view/forrest:css">
-                            <xsl:apply-templates select="/*/forrest:view/forrest:css"/>
+                        <xsl:if test="/*/forrest:views/forrest:view/forrest:css">
+                            <xsl:apply-templates select="/*/forrest:views/forrest:view/forrest:css"/>
                         </xsl:if>
                         <title>
                             <alias:value-of select="div[@id='content']/h1"/>

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=164616&r1=164615&r2=164616&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 Apr 25 11:23:48 2005
@@ -16,29 +16,27 @@
   limitations under the License.
 -->
 
-<forrest:view
-  xmlns:forrest="http://apache.org/forrest/templates/1.0" type="xhtml">
-
-  <forrest:contract name="meta"/>
-  
-  <forrest:hook name="container">
-    <forrest:hook name="branding">
-			<forrest:contract name="projectlogo"/>
-      <forrest:contract name="grouplogo"/>
-      <forrest:contract name="searchbox"/>
-      <forrest:contract name="nav-main"/>
-      <!--<forrest:contract name="nav-main-sub"/>-->
-    </forrest:hook>
-    <forrest:hook name="spacer" />
-    <forrest:contract name="nav"/>
-    <forrest:contract name="content">
-	    <forrest:contract name="fontsize"/>
-			<!--<forrest:hook name="export-link">
+<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" >
+  <forrest:view type="xhtml">
+    <forrest:contract name="meta"/>
+    <forrest:hook name="container">
+      <forrest:hook name="branding">
+        <forrest:contract name="projectlogo"/>
+        <forrest:contract name="grouplogo"/>
+        <forrest:contract name="searchbox"/>
+        <forrest:contract name="nav-main"/>
+        <!--<forrest:contract name="nav-main-sub"/>-->
+      </forrest:hook>
+      <forrest:hook name="spacer" />
+      <forrest:contract name="nav"/>
+      <forrest:contract name="content">
+        <forrest:contract name="fontsize"/>
+        <!--<forrest:hook name="export-link">
 	      <forrest:contract name="txt-link"/>
 		    <forrest:contract name="xml-link"/>
 			</forrest:hook>-->
-	  </forrest:contract>
-  </forrest:hook>
-  <forrest:contract name="feedback"/>
-  
-</forrest:view>
+      </forrest:contract>
+    </forrest:hook>
+    <forrest:contract name="feedback"/>
+  </forrest:view>
+</forrest:views>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/src/documentation/content/xdocs/howItWork.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/src/documentation/content/xdocs/howItWork.xml?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/src/documentation/content/xdocs/howItWork.xml
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/src/documentation/content/xdocs/howItWork.xml
Mon Apr 25 11:23:48 2005
@@ -70,11 +70,11 @@
 If no view can be found in the project we use the default one of the
 views plugin.
 
-b.  <![CDATA[<map:match pattern="prepare.include.*"> ]]>
+b.  <![CDATA[<map:match pattern="prepare.include.*.**"> ]]>
 Aggregate the contract-templates requested by the view with xinclude.
 The result is a stylesheet with all needed xsl:templates.
 
-c. <![CDATA[<map:match pattern="prepare.properties.*">]]>
+c. <![CDATA[<map:match pattern="prepare.properties.*.*">]]>
 Aggregate the forrest:properties requested by the *.fv.
 The result is an aggregation of properties which defines the templates
 to be call.

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/output.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/output.xmap?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/output.xmap
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/output.xmap
Mon Apr 25 11:23:48 2005
@@ -101,10 +101,10 @@
     Get the xsl:templates of the requested contract.
   -->
    <map:match pattern="get.contract.*.*">
-     <map:generate src="cocoon:/resolve.contract.{1}"/>
+     <map:generate src="cocoon:/resolve.contract.{2}"/>
      <map:transform src="resources/stylesheets/contract.xsl">
       <!--Which output format?-->
-      <map:parameter name="format" value="{2}"/>
+      <map:parameter name="format" value="{1}"/>
      </map:transform>
      <map:serialize type="xml"/>
    </map:match>
@@ -112,9 +112,12 @@
   Get the forrest:properties of the requested contract. 
   This will determine which templates (css, head, body) we have to call later on
   -->
-   <map:match pattern="get.contract-property.*">
-     <map:generate src="cocoon:/resolve.contract.{1}"/>
-     <map:transform src="resources/stylesheets/contract.property.xsl"/>
+   <map:match pattern="get.contract-property.*.*">
+     <map:generate src="cocoon:/resolve.contract.{2}"/>
+     <map:transform src="resources/stylesheets/contract.property.xsl">
+      <!--Which output format?-->
+      <map:parameter name="format" value="{1}"/>
+     </map:transform>
      <map:serialize type="xml"/>
    </map:match>
   <!--

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/stylesheets/contract.property.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/stylesheets/contract.property.xsl?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/stylesheets/contract.property.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/stylesheets/contract.property.xsl
Mon Apr 25 11:23:48 2005
@@ -20,12 +20,14 @@
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:forrest="http://apache.org/forrest/templates/1.0">
   
+  <xsl:param name="format"/>
+  
   <xsl:template match="/">
     <xsl:apply-templates select="//forrest:template"/>
   </xsl:template>
 
-	<xsl:template match="forrest:template">
-    <forrest:property body="{@body}" 
+	<xsl:template match="forrest:template[@format=$format]">
+    <forrest:property body="{@body}" format="{@format}"
       head="{@head}"
       css="{@css}"
       name="{@name}"/>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/templates/noFt.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/templates/noFt.ft?rev=164616&r1=164615&r2=164616&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/templates/noFt.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper/resources/templates/noFt.ft
Mon Apr 25 11:23:48 2005
@@ -18,7 +18,7 @@
 <forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
   name="noFt" type="nugget">
   <description>
-    This functions is a fallback when no ft is found.
+    Error 440 - Template not found. This functions is a fallback when no ft is found.
   </description>
   
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"



Mime
View raw message