forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r209682 - in /forrest/trunk/whiteboard/plugins: org.apache.forrest.plugin.internal.view/ org.apache.forrest.plugin.internal.view/resources/views/ org.apache.forrest.plugin.output.viewHelper.xhtml/ org.apache.forrest.plugin.output.viewHelper...
Date Fri, 08 Jul 2005 00:10:11 GMT
Author: thorsten
Date: Thu Jul  7 17:10:10 2005
New Revision: 209682

URL: http://svn.apache.org/viewcvs?rev=209682&view=rev
Log:
Added <forrest:call-template name=export-link/> feature to views. Now it is possible
to group view elements into templates and call them from any view.

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
  (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/views/default.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/output.xmap

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=209682&r1=209681&r2=209682&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
Thu Jul  7 17:10:10 2005
@@ -109,6 +109,8 @@
         <map:parameter value="resources/views/default.fv" name="viewFallback"/>
       </map:transform>
       <map:transform type="xinclude"/>
+      <map:transform src="resources/stylesheets/prepare.include.templates.xsl"/>
+      <map:transform type="xinclude"/>
     	<map:serialize type="xml"/>
     </map:match>
     

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=209682&r1=209681&r2=209682&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
Thu Jul  7 17:10:10 2005
@@ -38,10 +38,17 @@
                     <forrest:contract name="nav-section"/>
                     <forrest:contract name="search-input"/>
                 </forrest:hook>
-                <forrest:hook name="export-link">
+                <!-- You can group elements to a template and call it from any view.
+                  e.g.
+                  <forrest:hook name="export-link">
                     <forrest:contract name="content-txt-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"/>

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=209682&r1=209681&r2=209682&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
Thu Jul  7 17:10:10 2005
@@ -115,6 +115,19 @@
     <map:serialize type="xml"/>
   </map:match>
   
+  <!--This activates forrest:call-templates includes into the view.-->
+    <map:match pattern="prepare.view-templates.**">
+      <map:select type="exists">
+      <map:when test="{project:resources}/templates/{1}.vt.xml">
+        <map:generate src="{project:resources}/templates/{1}.vt.xml"/>
+      </map:when>
+      <map:when test="resources/templates/{1}.vt.xml">
+        <map:generate src="resources/templates/{1}.vt.xml"/>
+      </map:when>
+      </map:select>
+      <map:serialize type="xml"/>
+    </map:match>
+  
    <!-- <!-#-INTERFACE
     Get the xsl:templates of the requested contract.
   {1} format to deliver

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml?rev=209682&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
Thu Jul  7 17:10:10 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2002-2004 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
+
+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.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" >
+  <forrest:hook name="export-link">
+    <forrest:contract name="txt-link"/>
+    <forrest:contract name="pdf-link"/>
+  </forrest:hook>
+</forrest:template>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
------------------------------------------------------------------------------
    svn:keywords = Id svn:eol-style=native



Mime
View raw message