forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r496012 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes: common.fv common/html/common-fo.vt.xml common/html/common-html.vt.xml
Date Sun, 14 Jan 2007 01:27:02 GMT
Author: thorsten
Date: Sat Jan 13 17:27:00 2007
New Revision: 496012

URL: http://svn.apache.org/viewvc?view=rev&rev=496012
Log:
Extracting parts of the common structurer for easier reuse, extend and override them.

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-fo.vt.xml
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-html.vt.xml
  (with props)
Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common.fv

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common.fv
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common.fv?view=diff&rev=496012&r1=496011&r2=496012
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common.fv (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common.fv Sat Jan
13 17:27:00 2007
@@ -23,191 +23,21 @@
   <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}"/>
   <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
   <jx:set var="getRequestExtension" value="#{$cocoon/parameters/getRequestExtension}"
/>
+  <!-- 
+    You can group elements (hooks and contracts) to a template 
+    and import it from any structurer. 
+    The following <jx:import uri="cocoon://prepare.tiles.*"/>
+    are stored in 
+    {properties:dispatcher.themer}/themes/{properties:dispatcher.theme}/html/{1}.vt.xml 
+    or 
+    {properties:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/html/{1}.vt.xml
+    and can be overriden by
+    {properties:resources}/themes/{properties:dispatcher.theme}/html/{1}.vt.xml
+-->
   <forrest:view type="fo" hooksXpath="/">
-    <forrest:contract name="content"
-      dataURI="cocoon://#{$getRequest}.xml">
-      <forrest:property name="config">
-        <!-- Settings specific to PDF output. -->
-        <!-- 
-        Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
-        folio, legal, ledger, letter, quarto, tabloid (default letter).
-        Supported page orientations are portrait, landscape (default
-        portrait).
-        Supported text alignments are left, right, justify (default left).
-        -->
-        <page size="letter" orientation="portrait"
-          text-align="left" background-color="#ffffff"/>
-        
-        <!-- 
-        Pattern of the page numbering in the footer - Default is "Page x".
-        first occurrence of '1' digit represents the current page number,
-        second occurrence of '1' digit represents the total page number,
-        anything else is considered as the static part of the numbering pattern.
-        Examples : x is the current page number, y the total page number.
-        <page-numbering-format>none</page-numbering-format> Do not displays the
page numbering
-        <page-numbering-format>1</page-numbering-format> Displays "x"
-        <page-numbering-format>p1.</page-numbering-format> Displays "px."
-        <page-numbering-format>Page 1/1</page-numbering-format> Displays "Page
x/y"
-        <page-numbering-format>(1-1)</page-numbering-format> Displays "(x-y)"
-        -->
-        <page-numbering-format>Page 1</page-numbering-format>
-        <!-- Configure the TOC, i.e. the Table of Contents.
-        @max-depth
-        how many "section" levels need to be included in the
-        generated Table of Contents (TOC). 
-        @min-sections
-        Minimum required to create a TOC.
-        @location ("page","menu","page,menu", "none")
-        Where to show the TOC.
-        -->
-        <toc max-depth="2" min-sections="1" location="page"/>
-        
-        
-        <!-- Heading types can be clean|underlined|boxed  -->
-        <headings type="boxed" color="#4a6d8c"/>
-        <!--
-        Margins can be specified for top, bottom, inner, and outer
-        edges. If double-sided="false", the inner edge is always left
-        and the outer is always right. If double-sided="true", the
-        inner edge will be left on odd pages, right on even pages,
-        the outer edge vice versa.
-        Specified below are the default settings.
-        -->
-        <margins double-sided="false">
-          <top>1in</top>
-          <bottom>1in</bottom>
-          <inner>1.25in</inner>
-          <outer>1in</outer>
-        </margins>
-        
-        <!--
-        Print the URL text next to all links going outside the file
-        -->
-        <show-external-urls>false</show-external-urls>
-        
-        <!--
-        Disable the copyright footer on each page of the PDF.
-        A footer is composed for each page. By default, a "credit" with role=pdf
-        will be used, as explained below. Otherwise a copyright statement
-        will be generated. This latter can be disabled.
-        -->
-        <disable-copyright-footer>
-          false</disable-copyright-footer>
-        <colors>
-          <color name="code" value="#CFDCED"/>
-          <color name="highlight" value="#ffff00"/>
-          <color name="fixme" value="#cc6600"/>
-          <color name="note" value="#006699"/>
-          <color name="warning" value="#990000"/>
-          <color name="table" value="#7099C5"/>
-          <color name="table-cell" value="#f0f0ff"/>
-          <color name="body" value="#ffffff" link="#0F3660"
-            vlink="#009999" hlink="#000066"/>
-        </colors>
-        
-        <!-- The following are used to construct a copyright statement -->
-        <disable-copyright-footer>
-          false</disable-copyright-footer>
-        <year>2006</year>
-        <vendor>ACME</vendor>
-        <url>http://ACME.org</url>
-      </forrest:property>
-    </forrest:contract>
+    <jx:import uri="cocoon://prepare.tiles.common-fo"/>
   </forrest:view>
   <forrest:view type="html" hooksXpath="/html/body">
-    <!-- 
-        @type defines this structurer to html.
-        @hooksXpath defines where all hooks will be injected (as prefix).
-        -->
-    <forrest:contract name="branding-css-links">
-      <!-- More information around this contract
-        http://marc.theaimsgroup.com/?l=forrest-dev&m=113473237805195&w=2
-        -->
-      <!--Note: The forrest:properties element does not exit anymore (in comparison to
a previous versions) -->
-      <forrest:property name="branding-css-links-input">
-        <css url="common.css"/>
-      </forrest:property>
-    </forrest:contract>
-    <forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info">
-      <forrest:property name="custom">
-         <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
-      </forrest:property>
-      <forrest:property name="theme" value="common"/>
-    </forrest:contract>
-    <!--
-        nuggets (extra data requested by the contract) are now defined in the contract element.

-        As well the former @nugget is now called @dataURI to reflect better the function
of the attribute.
-      -->
-    <forrest:hook name="container">
-      <forrest:hook name="header">
-        <forrest:contract name="branding-tagline">
-          <forrest:property name="branding-tagline-name">new 
-            seed</forrest:property>
-          <forrest:property name="branding-tagline-tagline">powered by the 
-            dispatcher</forrest:property>
-        </forrest:contract>
-        <forrest:hook name="nav-main-hook">
-          <forrest:contract name="nav-main" 
-            dataURI="cocoon://#{$getRequest}.navigation.xml"/>
-          <forrest:contract name="nav-main-sub" 
-            dataURI="cocoon://#{$getRequest}.navigation.xml"/>
-        </forrest:hook>
-      </forrest:hook>
-      <forrest:hook name="page">
-        <forrest:hook name="leftbar">
-          <forrest:contract name="nav-section" 
-            dataURI="cocoon://#{$getRequest}.navigation.xml">
-            <forrest:property name="nav-section-toc" nugget="get.toc">
-              <jx:import uri="cocoon://#{$getRequest}.toc.xml"/>
-            </forrest:property>
-            <forrest:property name="toc" max-depth="2"/>
-          </forrest:contract>
-        </forrest:hook>
-        <forrest:contract name="search-input">
-          <forrest:property name="search-input">
-            <search name="MyProject" domain="mydomain" provider="google"/>
-          </forrest:property>
-        </forrest:contract>
-      </forrest:hook>
-      <!--  You can group elements to a template and call it from any view. e.g.
-<forrest:hook name="export-link">
-  <forrest:contract name="content-xml-link"/>
-  <forrest:contract name="content-pdf-link"/>
-</forrest:hook>
- can be called as  <jx:import uri="cocoon://prepare.tiles.export-link"/>
- when saved as 
- {project:resources}/templates/{project:theme}/export-link.vt.xml 
- or
- {project:resources}/templates/export-link.vt.xml
- 
-HEADSUP:
-<forrest:call-template name="export-link"/> is *not* working anymore!!!
--->
-        <jx:import uri="cocoon://prepare.tiles.export-link"/>
-        <forrest:hook name="content">
-          <forrest:contract name="content-title" 
-            dataURI="cocoon://#{$getRequest}.title.xml"/>
-          <forrest:contract name="content-abstract" 
-            dataURI="cocoon://#{$getRequest}.abstract.xml"/>
-          <forrest:contract name="content-minitoc" 
-            dataURI="cocoon://#{$getRequest}.toc.xml">
-            <forrest:property name="content-minitoc-conf" max-depth="2" 
-              min-sections="1" location="page"/>
-          </forrest:contract>
-          <forrest:contract name="content-main" 
-              dataURI="cocoon://#{$getRequest}.body.xml"/>
-        </forrest:hook>
-    </forrest:hook>
-    <forrest:hook name="footer">
-      <forrest:contract name="siteinfo-feedback">
-          <forrest:property name="siteinfo-feedback">
-            <feedback to="webmaster@foo.com"
-              href="mailto:webmaster@foo.com?subject=Feedback&#160;" >
-              Send feedback about the website to:
-            </feedback>
-          </forrest:property>
-      </forrest:contract>
-      <forrest:contract name="siteinfo-last-published"/>
-    </forrest:hook>
+    <jx:import uri="cocoon://prepare.tiles.common-html"/>
   </forrest:view>
 </forrest:views>

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-fo.vt.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-fo.vt.xml?view=auto&rev=496012
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-fo.vt.xml
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-fo.vt.xml
Sat Jan 13 17:27:00 2007
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <forrest:contract name="content"
+      dataURI="cocoon://#{$getRequest}.xml">
+      <forrest:property name="config">
+        <!-- Settings specific to PDF output. -->
+        <!-- 
+        Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
+        folio, legal, ledger, letter, quarto, tabloid (default letter).
+        Supported page orientations are portrait, landscape (default
+        portrait).
+        Supported text alignments are left, right, justify (default left).
+        -->
+        <page size="letter" orientation="portrait"
+          text-align="left" background-color="#ffffff"/>
+        
+        <!-- 
+        Pattern of the page numbering in the footer - Default is "Page x".
+        first occurrence of '1' digit represents the current page number,
+        second occurrence of '1' digit represents the total page number,
+        anything else is considered as the static part of the numbering pattern.
+        Examples : x is the current page number, y the total page number.
+        <page-numbering-format>none</page-numbering-format> Do not displays the
page numbering
+        <page-numbering-format>1</page-numbering-format> Displays "x"
+        <page-numbering-format>p1.</page-numbering-format> Displays "px."
+        <page-numbering-format>Page 1/1</page-numbering-format> Displays "Page
x/y"
+        <page-numbering-format>(1-1)</page-numbering-format> Displays "(x-y)"
+        -->
+        <page-numbering-format>Page 1</page-numbering-format>
+        <!-- Configure the TOC, i.e. the Table of Contents.
+        @max-depth
+        how many "section" levels need to be included in the
+        generated Table of Contents (TOC). 
+        @min-sections
+        Minimum required to create a TOC.
+        @location ("page","menu","page,menu", "none")
+        Where to show the TOC.
+        -->
+        <toc max-depth="2" min-sections="1" location="page"/>
+        
+        
+        <!-- Heading types can be clean|underlined|boxed  -->
+        <headings type="boxed" color="#4a6d8c"/>
+        <!--
+        Margins can be specified for top, bottom, inner, and outer
+        edges. If double-sided="false", the inner edge is always left
+        and the outer is always right. If double-sided="true", the
+        inner edge will be left on odd pages, right on even pages,
+        the outer edge vice versa.
+        Specified below are the default settings.
+        -->
+        <margins double-sided="false">
+          <top>1in</top>
+          <bottom>1in</bottom>
+          <inner>1.25in</inner>
+          <outer>1in</outer>
+        </margins>
+        
+        <!--
+        Print the URL text next to all links going outside the file
+        -->
+        <show-external-urls>false</show-external-urls>
+        
+        <!--
+        Disable the copyright footer on each page of the PDF.
+        A footer is composed for each page. By default, a "credit" with role=pdf
+        will be used, as explained below. Otherwise a copyright statement
+        will be generated. This latter can be disabled.
+        -->
+        <disable-copyright-footer>
+          false</disable-copyright-footer>
+        <colors>
+          <color name="code" value="#CFDCED"/>
+          <color name="highlight" value="#ffff00"/>
+          <color name="fixme" value="#cc6600"/>
+          <color name="note" value="#006699"/>
+          <color name="warning" value="#990000"/>
+          <color name="table" value="#7099C5"/>
+          <color name="table-cell" value="#f0f0ff"/>
+          <color name="body" value="#ffffff" link="#0F3660"
+            vlink="#009999" hlink="#000066"/>
+        </colors>
+        
+        <!-- The following are used to construct a copyright statement -->
+        <disable-copyright-footer>
+          false</disable-copyright-footer>
+        <year>2006</year>
+        <vendor>ACME</vendor>
+        <url>http://ACME.org</url>
+      </forrest:property>
+    </forrest:contract>
+</forrest:template>
\ No newline at end of file

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-fo.vt.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-html.vt.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-html.vt.xml?view=auto&rev=496012
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-html.vt.xml
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-html.vt.xml
Sat Jan 13 17:27:00 2007
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <!-- 
+        @type defines this structurer to html.
+        @hooksXpath defines where all hooks will be injected (as prefix).
+        -->
+    <forrest:contract name="branding-css-links">
+      <!-- More information around this contract
+        http://marc.theaimsgroup.com/?l=forrest-dev&m=113473237805195&w=2
+        -->
+      <!--Note: The forrest:properties element does not exit anymore (in comparison to
a previous versions) -->
+      <forrest:property name="branding-css-links-input">
+        <css url="common.css"/>
+      </forrest:property>
+    </forrest:contract>
+    <forrest:contract name="siteinfo-meta" dataURI="lm://project.build-info">
+      <forrest:property name="custom">
+         <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
+      </forrest:property>
+      <forrest:property name="theme" value="common"/>
+    </forrest:contract>
+    <!--
+        nuggets (extra data requested by the contract) are now defined in the contract element.

+        As well the former @nugget is now called @dataURI to reflect better the function
of the attribute.
+      -->
+    <forrest:hook name="container">
+      <forrest:hook name="header">
+        <forrest:contract name="branding-tagline">
+          <forrest:property name="branding-tagline-name">new 
+            seed</forrest:property>
+          <forrest:property name="branding-tagline-tagline">powered by the 
+            dispatcher</forrest:property>
+        </forrest:contract>
+        <forrest:hook name="nav-main-hook">
+          <forrest:contract name="nav-main" 
+            dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+          <forrest:contract name="nav-main-sub" 
+            dataURI="cocoon://#{$getRequest}.navigation.xml"/>
+        </forrest:hook>
+      </forrest:hook>
+      <forrest:hook name="page">
+        <forrest:hook name="leftbar">
+          <forrest:contract name="nav-section" 
+            dataURI="cocoon://#{$getRequest}.navigation.xml">
+            <forrest:property name="nav-section-toc" nugget="get.toc">
+              <jx:import uri="cocoon://#{$getRequest}.toc.xml"/>
+            </forrest:property>
+            <forrest:property name="toc" max-depth="2"/>
+          </forrest:contract>
+        </forrest:hook>
+        <forrest:contract name="search-input">
+          <forrest:property name="search-input">
+            <search name="MyProject" domain="mydomain" provider="google"/>
+          </forrest:property>
+        </forrest:contract>
+      </forrest:hook>
+<!--  
+    You can group elements (hooks and contracts) to a template 
+    and import it from any structurer. 
+  
+<forrest:hook name="export-link">
+  <forrest:contract name="content-xml-link"/>
+  <forrest:contract name="content-pdf-link"/>
+</forrest:hook>
+  
+    can be called as  <jx:import uri="cocoon://prepare.tiles.export-link"/>
+    when stored in 
+    {properties:resources}/themes/{properties:dispatcher.theme}/html/export-link.vt.xml
+    or
+    {properties:dispatcher.themer}/themes/{properties:dispatcher.theme}/html/export-link.vt.xml

+    or 
+    {properties:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/html/export-link.vt.xml
+-->
+        <jx:import uri="cocoon://prepare.tiles.export-link"/>
+        <forrest:hook name="content">
+          <forrest:contract name="content-title" 
+            dataURI="cocoon://#{$getRequest}.title.xml"/>
+          <forrest:contract name="content-abstract" 
+            dataURI="cocoon://#{$getRequest}.abstract.xml"/>
+          <forrest:contract name="content-minitoc" 
+            dataURI="cocoon://#{$getRequest}.toc.xml">
+            <forrest:property name="content-minitoc-conf" max-depth="2" 
+              min-sections="1" location="page"/>
+          </forrest:contract>
+          <forrest:contract name="content-main" 
+              dataURI="cocoon://#{$getRequest}.body.xml"/>
+        </forrest:hook>
+    </forrest:hook>
+    <forrest:hook name="footer">
+      <forrest:contract name="siteinfo-feedback">
+          <forrest:property name="siteinfo-feedback">
+            <feedback to="webmaster@foo.com"
+              href="mailto:webmaster@foo.com?subject=Feedback&#160;" >
+              Send feedback about the website to:
+            </feedback>
+          </forrest:property>
+      </forrest:contract>
+      <forrest:contract name="siteinfo-last-published"/>
+    </forrest:hook>
+</forrest:template>
\ No newline at end of file

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/common-html.vt.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message