forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r357581 - in /forrest/trunk/main/template-sites/v3/src/documentation: content/xdocs/abstract-to-xhtml2.fv content/xdocs/samples/common.fv resources/themes/common/html/xhtml2-content-abstract.ft resources/themes/common/xhtml2/abstract.ft
Date Mon, 19 Dec 2005 00:21:08 GMT
Author: thorsten
Date: Sun Dec 18 16:20:56 2005
New Revision: 357581

URL: http://svn.apache.org/viewcvs?rev=357581&view=rev
Log:
Added xhtml2 contract abstract.ft and corresponding html contract xhtml2-content-abstract.ft
and abstract-to-xhtml2.fv to v3

Added:
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/abstract-to-xhtml2.fv
      - copied, changed from r357566, forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-abstract.ft
      - copied, changed from r357566, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/abstract.ft
      - copied, changed from r357566, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft
Modified:
    forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv

Copied: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/abstract-to-xhtml2.fv
(from r357566, forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/abstract-to-xhtml2.fv?p2=forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/abstract-to-xhtml2.fv&p1=forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv&r1=357566&r2=357581&rev=357581&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/title-to-xhtml2.fv
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/abstract-to-xhtml2.fv
Sun Dec 18 16:20:56 2005
@@ -23,7 +23,7 @@
   <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
   <jx:set var="getRequestExstension" value="#{$cocoon/parameters/getRequestExstension}"
/>
     <forrest:view type="xhtml2" hooksXpath="/">
-      <forrest:contract name="title" 
+      <forrest:contract name="abstract" 
         dataURI="cocoon://#{$getRequest}.xml"/>
     </forrest:view>
 </forrest:views>

Modified: forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv?rev=357581&r1=357580&r2=357581&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/content/xdocs/samples/common.fv
Sun Dec 18 16:20:56 2005
@@ -90,8 +90,8 @@
         <forrest:hook name="content">
           <forrest:contract name="xhtml2-content-title" 
             dataURI="cocoon://internal.#{$getRequest}.title"/>
-          <!--<forrest:contract name="content-abstract" 
-            dataURI="cocoon://#{$getRequest}.abstract.xml"/>
+          <forrest:contract name="xhtml2-content-abstract" 
+            dataURI="cocoon://internal.#{$getRequest}.abstract"/><!--
           <forrest:contract name="content-minitoc" 
             dataURI="cocoon://#{$getRequest}.toc.xml">
             <forrest:property name="content-minitoc-conf" max-depth="2" 

Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-abstract.ft
(from r357566, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-abstract.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-abstract.ft&p1=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft&r1=357566&r2=357581&rev=357581&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-title.ft
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/xhtml2-content-abstract.ft
Sun Dec 18 16:20:56 2005
@@ -18,29 +18,24 @@
 <forrest:contract 
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  name="xhtml2-content-title">
+  name="xhtml2-content-abstract">
   <description>
-    xhtml2-content-title - Template will output the title of the document. 
+    xhtml2-content-abstract - Template will output the abstract of the document. 
   </description>
-  <usage><![CDATA[<forrest:contract name="siteinfo-meta" dataURI="cocoon://#{$getRequest}.title.xml"/>
+  <usage><![CDATA[<forrest:contract name="siteinfo-meta" dataURI="cocoon://#{$getRequest}.abstract.xml"/>
 ]]></usage>
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-    name="xhtml2-content-title" inputFormat="xsl">
+    name="xhtml2-content-abstract" inputFormat="xsl">
      <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-       <xsl:param name="xhtml2-content-title" select="/"/>
+       <xsl:param name="xhtml2-content-abstract" select="/"/>
       <xsl:template match="/">
         <forrest:content>
           <forrest:part>
-            <xsl:comment>+ |start xhtml2-content-title +</xsl:comment>
-            <h1>
-              <xsl:value-of select="$xhtml2-content-title/*"/>
-            </h1>
-            <xsl:comment>+ |end xhtml2-content-title +</xsl:comment>
-          </forrest:part>
-          <forrest:part xpath="/html/head">
-            <xsl:comment>+ |start xhtml2-content-title +</xsl:comment>
-        <xsl:copy-of select="$xhtml2-content-title/*"/>
-        <xsl:comment>+ |end xhtml2-content-title +</xsl:comment>
+            <xsl:comment>+ |start xhtml2-content-abstract +</xsl:comment>
+            <div class="abstract">
+              <xsl:value-of select="$xhtml2-content-abstract"/>
+            </div>
+            <xsl:comment>+ |end xhtml2-content-abstract +</xsl:comment>
           </forrest:part>
         </forrest:content>
       </xsl:template>

Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/abstract.ft
(from r357566, forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/abstract.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/abstract.ft&p1=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft&r1=357566&r2=357581&rev=357581&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/blank.ft
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/xhtml2/abstract.ft
Sun Dec 18 16:20:56 2005
@@ -19,17 +19,14 @@
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:forrest="http://apache.org/forrest/templates/1.0"
   xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
-  name="blank">
-  
-  <!--NOTE: 
-    When using the blank template as c'n p master just search and replace 'blank' by the
{contract-name}!-->
+  name="abstract">
   
   <description>
-    blank will output {contract-funtion}. This is just a blank contract, it will output *nothing*.
+    abstract will output the documtent abstract.
   </description>
-  <usage><![CDATA[<forrest:contract name="blank"/>]]></usage>
+  <usage><![CDATA[<forrest:contract name="abstract"/>]]></usage>
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-    name="blank" inputFormat="xsl">
+    name="abstract" inputFormat="xsl">
     <xsl:stylesheet version="1.1" 
       xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -37,10 +34,19 @@
       <!--<xsl:variable name="skin-img-dir" select="$defaultVariables/*/*[@name='skin-img-dir']/@value"/>-->
       <xsl:template match="/">
         <forrest:content>
-          <!--<forrest:part/>-->
-          <!--<forrest:part xpath="/html/head"/>-->
+          <forrest:part>
+            <xsl:apply-templates select="xhtml2:html/xhtml2:head"/>
+          </forrest:part>
         </forrest:content>
       </xsl:template>
+      <xsl:template match="xhtml2:head">
+          <xsl:if test="xhtml2:meta [@property='abstract']">
+            <xsl:copy-of select="xhtml2:meta[@property='abstract']"/>
+          </xsl:if>
+          <xsl:if test="not(xhtml2:meta[@property='abstract'])">
+            <meta property="abstract"/>
+          </xsl:if>
+        </xsl:template>
     </xsl:stylesheet>
   </forrest:template>
 </forrest:contract>



Mime
View raw message