Author: thorsten
Date: Fri Dec 16 18:27:39 2005
New Revision: 357276

URL: http://svn.apache.org/viewcvs?rev=357276&view=rev
Log:
Some more refactored contracts.

Added:
    
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-tagline.ft
      - copied, changed from r357269, 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-tagline.ft
Modified:
    
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
    
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-meta.ft

Modified: 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv?rev=357276&r1=357275&r2=357276&view=diff
==============================================================================
--- 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
 (original)
+++ 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common.fv
 Fri Dec 16 18:27:39 2005
@@ -21,7 +21,7 @@
   xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";>
   <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
   <jx:set var="getRequestExstension" 
value="#{$cocoon/parameters/getRequestExstension}" />
-  <forrest:view type="html" xpath="/html/body">
+  <forrest:view type="html" hooksXpath="/html/body">
     <forrest:contract name="branding-css-links">
       <forrest:property name="branding-css-links-input">
         <css url="common.css"/>

Copied: 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-tagline.ft
 (from r357269, 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-tagline.ft)
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-tagline.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-tagline.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-tagline.ft&r1=357269&r2=357276&rev=357276&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/branding-tagline.ft
 (original)
+++ 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/branding-tagline.ft
 Fri Dec 16 18:27:39 2005
@@ -15,30 +15,34 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0";
-    name="branding-tagline" type="nugget">
-    <description>
-        branding-tagline will output the site name and tagline.
+<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"; 
+  name="branding-tagline">
+  <description> branding-tagline will output the site name and tagline. 
     </description>
-    <usage><![CDATA[<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 
+  <usage><![CDATA[<forrest:contract name="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>]]></usage>
-    <forrest:template 
-        xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
-        xmlns:forrest="http://apache.org/forrest/templates/1.0";
-        format="html" name="branding-tagline" inputFormat="xsl" body="true" 
head="false" css="false">
-        <xsl:stylesheet version="1.1" 
-            xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
-            <xsl:template name="branding-tagline-body">
-              <xsl:param name="branding-tagline-name"/>
-              <xsl:param name="branding-tagline-tagline"/>
-                <div id="branding-tagline-name"><xsl:value-of 
select="$branding-tagline-name"/> </div>
-                <div id="branding-tagline-tagline"><xsl:value-of 
select="$branding-tagline-tagline"/></div>
-            </xsl:template>
-        </xsl:stylesheet>
-    </forrest:template>
+  <forrest:template xmlns:i18n="http://apache.org/cocoon/i18n/2.1"; 
+    xmlns:forrest="http://apache.org/forrest/templates/1.0"; 
+    name="branding-tagline" inputFormat="xsl">
+    <xsl:stylesheet version="1.1" 
+      xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+      <xsl:param name="branding-tagline-name"/>
+      <xsl:param name="branding-tagline-tagline"/>
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part>
+            <div id="branding-tagline-name">
+              <xsl:value-of select="$branding-tagline-name"/>
+            </div>
+            <div id="branding-tagline-tagline">
+              <xsl:value-of select="$branding-tagline-tagline"/>
+            </div>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+    </xsl:stylesheet>
+  </forrest:template>
 </forrest:contract>

Modified: 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-meta.ft
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-meta.ft?rev=357276&r1=357275&r2=357276&view=diff
==============================================================================
--- 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-meta.ft
 (original)
+++ 
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-meta.ft
 Fri Dec 16 18:27:39 2005
@@ -15,7 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<forrest:contract name="siteinfo-meta" type="nugget"
+<forrest:contract name="siteinfo-meta"
   xmlns:forrest="http://apache.org/forrest/templates/1.0";>
   <description>
     <p>This functions will output the html meta information.</p>
@@ -24,28 +24,28 @@
       <div class="content">Implemented forrest version/skin name.</div>
     </div>
   </description>
-  <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>
+  <usage><![CDATA[<forrest:contract name="siteinfo-meta" 
dataURI="lm://project.build-info"/>]]></usage>
   <forrest:template
   xmlns:forrest="http://apache.org/forrest/templates/1.0";
-  format="html" name="siteinfo-meta" inputFormat="xsl" body="false" 
head="true">
+  name="siteinfo-meta" inputFormat="xsl">
     <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"/>
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part xpath="/html/head">
+            <meta name="Generator" content="Apache Forrest"/>
+            <xsl:apply-templates/>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+                 <xsl:template match="info">
                    <meta name="Forrest-version">
                      <xsl:attribute name="content">
-                       <xsl:value-of 
select="$siteinfo-meta/info/forrest-version"/>
+                       <xsl:value-of select="forrest-version"/>
                      </xsl:attribute>
                    </meta>
                    <meta name="Forrest-skin-name">
                      <xsl:attribute name="content">
-                       <xsl:value-of 
select="$siteinfo-meta/info/project-skin"/>
+                       <xsl:value-of select="project-skin"/>
                      </xsl:attribute>
                    </meta>
                  </xsl:template>


Reply via email to