forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r215902 - in /forrest/trunk: main/webapp/WEB-INF/xconf/ whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/ whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/
Date Tue, 12 Jul 2005 00:23:07 GMT
Author: thorsten
Date: Mon Jul 11 17:23:04 2005
New Revision: 215902

URL: http://svn.apache.org/viewcvs?rev=215902&view=rev
Log:
Added a new {defaults:view-internal} to better reuse the internal code of views. has the benefit
that I only need to change the forrest-core.conf when we move views in to the core.

The change in includes-viewLocationmap.xsl allows us to parse the views extension as paramater.
That allows us to easily change '.fv' to '.fv.xml' via the sitemap.

Modified:
    forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/includes-viewLocationmap.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap

Modified: forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf?rev=215902&r1=215901&r2=215902&view=diff
==============================================================================
--- forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf (original)
+++ forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf Mon Jul 11 17:23:04 2005
@@ -130,6 +130,7 @@
         <whiteboard-plugins-src>@forrest.home@/whiteboard/plugins</whiteboard-plugins-src>
         <plugins>@forrest.home@/build/plugins</plugins>
         <locationmap>@context.home@/locationmap.xml</locationmap>
+        <view-internal>@forrest.home@/build/plugins/org.apache.forrest.plugin.internal.view</view-internal>
       </values>
     </component-instance>
 

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/includes-viewLocationmap.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/includes-viewLocationmap.xsl?rev=215902&r1=215901&r2=215902&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/includes-viewLocationmap.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/includes-viewLocationmap.xsl
Mon Jul 11 17:23:04 2005
@@ -22,6 +22,7 @@
   
   <xsl:param name="defaultView" select="'default.fv'"/>
   <xsl:param name="rootElement" select="'/xdocs/'"/>
+  <xsl:param name="viewExtension" select="'.fv'"/>
   <xsl:param name="path" select="'.'"/>
   <xsl:param name="root" select="'xdocs'"/>
   <xsl:param name="viewFallback" select="'resources/views/default.fv'"/>
@@ -29,7 +30,8 @@
    <!--
     *viewSelector* project-xdocs
     will return which view is responsible for the requested path.
-    If no view (choice|fallback) could be found the template will return the viewFallback.
+    If no view (choice|fallback) could be found the template will return the 
+    viewFallback (resources/views/default.fv).
     
     ex.: 
     1.request: index 
@@ -66,7 +68,7 @@
     </xsl:comment>-->
     <xsl:variable name="view2response">
       <xsl:call-template name="viewSelector">
-	      <xsl:with-param name="request" select="concat($path,'.fv')"/>
+	      <xsl:with-param name="request" select="concat($path,$viewExtension)"/>
 	      <xsl:with-param name="rest" select="''"/>
 	    </xsl:call-template>
     </xsl:variable>

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=215902&r1=215901&r2=215902&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
Mon Jul 11 17:23:04 2005
@@ -125,9 +125,7 @@
         <map:generate src="resources/templates/{1}.vt.xml"/>
       </map:when>
       </map:select>
-      <!--FIXME: this has to come from the core
-        Duplicate stylesheet!!!-->
-      <map:transform src="resources/stylesheets/prepare.include.templates.xsl"/>
+      <map:transform src="{defaults:view-internal}/resources/stylesheets/prepare.include.templates.xsl"/>
       <map:transform type="xinclude"/>
       <map:serialize type="xml"/>
     </map:match>



Mime
View raw message