forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r321269 [2/4] - in /forrest/site: ./ docs_0_60/ docs_0_60/howto/ docs_0_60/howto/bugzilla-patch/ docs_0_60/howto/multi/ docs_0_70/ docs_0_70/howto/ docs_0_70/howto/cvs-ssh/ docs_0_70/howto/multi/ docs_0_80/ docs_0_80/howto/ docs_0_80/howto/...
Date Sat, 15 Oct 2005 00:49:10 GMT
Added: forrest/site/docs_0_80/howto/howto-structurer-contracts.html
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-structurer-contracts.html?rev=321269&view=auto
==============================================================================
--- forrest/site/docs_0_80/howto/howto-structurer-contracts.html (added)
+++ forrest/site/docs_0_80/howto/howto-structurer-contracts.html Fri Oct 14 17:42:44 2005
@@ -0,0 +1,704 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8-dev">
+<meta name="Forrest-skin-name" content="pelt">
+<title>How to write a forrest:contract? (v0.8-dev)</title>
+<link type="text/css" href="../../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../../skin/profile.css" rel="stylesheet">
+<script src="../../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../../favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://forrest.apache.org/">forrest</a><script src="../../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://www.apache.org/"><img class="logoImage" alt="Apache" src="../../images/apache-forrest.png" title="The Apache Software Foundation"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://forrest.apache.org/"><img class="logoImage" alt="Forrest" src="../../images/project-logo.gif" title="Apache Forrest"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="forrest.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="base-not-selected" href="../../index.html">Welcome</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../contrib.html">Project</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../versions/index.html">Versioned Docs</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../pluginDocs/index.html">Plugins</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../tools/index.html">Tools</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+             
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">0.80-dev</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/faq.html">FAQs</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/changes.html">Changes</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/todo.html">Todo</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/your-project.html">Using Forrest</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/locationmap.html">Locationmap</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/validation.html">XML Validation</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/linking.html">Menus and Linking</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/searching.html">Searching</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/skins.html">Default Skins</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/skin-package.html">Skin Packages</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/views.html">Views development</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/forrest-contract.html">Our Contract</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/compliance.html">Standards Compliance</a>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15', '../../skin/')" id="menu_selected_1.1.15Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">How-To</div>
+<div id="menu_selected_1.1.15" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-howto.html">Write a How-to</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-dev.html">Be a developer</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-asf-mirror.html">Download mirror</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-pdf-tab.html">Create tab PDF</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-editcss.html">Edit CSS (WYSIWYG)</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-corner-images.html">CSS corner SVG</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-forrest-from-maven.html">Maven Integration</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-buildPlugin.html">Build a Plugin</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-custom-html-source.html">Custom html source</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.15.11', '../../skin/')" id="menu_1.1.15.11Title" class="menutitle">Multipage HowTo</div>
+<div id="menu_1.1.15.11" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/howto-multi.html">Introduction</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step1.html">Step 1</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step2.html">Step 2</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step3.html">Step 3</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15.12', '../../skin/')" id="menu_selected_1.1.15.12Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Dispatcher</div>
+<div id="menu_selected_1.1.15.12" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-install.html">Install</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">Contract implementations</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.15.13', '../../skin/')" id="menu_1.1.15.13Title" class="menutitle">Old Views (deprecated)</div>
+<div id="menu_1.1.15.13" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-contracts.html">Contract implementations</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.16', '../../skin/')" id="menu_1.1.16Title" class="menutitle">Advanced Topics</div>
+<div id="menu_1.1.16" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/build.html">Building Forrest</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/catalog.html">Using DTD Catalogs</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/sitemap-ref.html">Sitemap Reference</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/project-sitemap.html">Project sitemap</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/cap.html">Sourcetype Action</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/upgrading_08.html">Upgrading to 0.8</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.18', '../../skin/')" id="menu_1.1.18Title" class="menutitle">Reference docs</div>
+<div id="menu_1.1.18" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.1.18.1', '../../skin/')" id="menu_1.1.18.1Title" class="menutitle">DTD documentation</div>
+<div id="menu_1.1.18.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../dtdx/dtd-docs.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v20.dtdx.html">document-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/howto-v20.dtdx.html">howto-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/faq-v20.dtdx.html">faq-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v13.dtdx.html">document-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/howto-v13.dtdx.html">howto-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/faq-v13.dtdx.html">faq-v13</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.18.2', '../../skin/')" id="menu_1.1.18.2Title" class="menutitle">Doc samples</div>
+<div id="menu_1.1.18.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../dtdx/document-v13.html">document-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v20.html">document-v20</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.19', '../../skin/')" id="menu_1.1.19Title" class="menutitle">Older Docs</div>
+<div id="menu_1.1.19" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/primer.html">Forrest Primer</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/libre-intro.html">Libre</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/dreams.html">Dream list</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/cvs-ssh/howto-cvs-ssh.html">CVS over SSH</a>
+</div>
+</div>
+</div>
+<div id="credit">
+<hr>
+        This is documentation for development version v0.8
+       (<a href="http://forrest.apache.org/versions/">More</a>)</div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2">
+<a href="http://apachecon.com/"><img border="0" title="ApacheCon US 2005" alt="ApacheCon US 2005 - logo" src="http://apache.org/images/ac2005us_blue_125x125.jpg" style="width: 125px;height: 125px;"></a>
+</div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="howto-structurer-contracts.pdf"><img alt="PDF -icon" src="../../skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>How to write a forrest:contract?</h1>
+<div class="abstract">
+    This How-To will explain how we wrote the contracts for views and hope afterwards you will be able to do the same.
+  </div>
+<div id="motd-area">
+        This is documentation for development version v0.8
+       (<a href="http://forrest.apache.org/versions/">More</a>)</div>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Intended Audience">Intended Audience</a>
+</li>
+<li>
+<a href="#Purpose">Purpose</a>
+</li>
+<li>
+<a href="#Prerequisites">Prerequisites</a>
+</li>
+<li>
+<a href="#Steps">Steps</a>
+<ul class="minitoc">
+<li>
+<a href="#enhanceMaintenance">Enhance the maintenance</a>
+</li>
+<li>
+<a href="#blankContract">Explaining the blank forrest:contract</a>
+</li>
+<li>
+<a href="#newContract">Create a new contract</a>
+</li>
+<li>
+<a href="#viewContract">Activating the contract</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#Further Reading">Further Reading</a>
+</li>
+<li>
+<a href="#Feedback">Feedback</a>
+</li>
+</ul>
+</div>
+<a name="N10010"></a><a name="Intended Audience"></a>
+<h2 class="underlined_10">Intended Audience</h2>
+<div class="section">
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">
+"Views" are new functionality which is still in development phase. That is why it is in the
+"whiteboard" section of the Forrest distribution.
+This HowTo is a good start but still needs more work.
+</div>
+</div>
+<p>
+      Devs and skin developer that wants to get started with forrest:contract development. 
+      To really understand this how-to you need basic and sometimes advanced understanding of 
+      the "old fashion" skin development process.
+    </p>
+</div>
+<a name="N1001B"></a><a name="Purpose"></a>
+<h2 class="underlined_10">Purpose</h2>
+<div class="section">
+<p>
+      This setup guide will explain how to create a forrest:contract from scratch and 
+      how this forrest:contract work with the core parts of forrest.
+    </p>
+</div>
+<a name="N10023"></a><a name="Prerequisites"></a>
+<h2 class="underlined_10">Prerequisites</h2>
+<div class="section">
+<ul>
+      
+<li>
+        You have a ready-to-go new seed (newSeed) based on views like described in <a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>.
+      </li>
+      
+<li>
+      	This includes as well all additional plugins that are mentioned in <a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>.
+      </li>
+      
+<li>
+        Reading that how-to is as well a good idea to understand the used directory structure in this how-to.
+      </li>
+    
+</ul>
+</div>
+<a name="N1003C"></a><a name="Steps"></a>
+<h2 class="underlined_10">Steps</h2>
+<div class="section">
+<div class="note">
+<div class="label">Note</div>
+<div class="content">The following content is from many mails around the topic, this how-to tries to be the 
+      consolidation of this thread. It is mainly based on the thread "[RT] Why using views" - 
+      in comparison with "old fashion" skins - usecase i18n</div>
+</div>
+<p>
+      By working on the i18n integration for "pelt" we again encountered the reasons for using views. ;-)
+      The maintenance problem was to change the captions of the skin features (contracts) to enable
+      support for i18n. The case is that the <span class="codefrag">site2xhtml.xsl</span> has a lot of repeating code. 
+    </p>
+<p>
+      For example the "last-publish"-contract could be found 2 times in the code.  
+      This is not the only contract that was (is) doubled in the code. The problem with that is that 
+      we needed to search the code for each caption and senselessly repeat the following 
+      maintenance step of adding the &lt;i18n:text/&gt;-tags.
+    </p>
+<pre class="code">
+
+- &lt;script language="JavaScript"
+- type="text/javascript"&gt;document.write("Published: " + document.lastModified);&lt;/script&gt;
+
++ &lt;script type="text/javascript"&gt;document.write("&lt;i18n:text &gt;Last
++ Published:&lt;/i18n:text&gt;&amp;#160;" + document.lastModified);
+
+    </pre>
+<a name="N10051"></a><a name="enhanceMaintenance"></a>
+<h3 class="underlined_5">Enhance the maintenance</h3>
+<p>Now we can enhance the maintenance for the future and we give these code snippets 
+        contracts names (based on their functionality). This naming enables us to keep
+the contract separate from the position code itself. In xsl you would
+simply do:
+      </p>
+<ol>
+        
+<li>replace the script by &lt;xsl:call-template name="siteinfo-last-published"/&gt;</li>
+        
+<li>and add:</li>
+      
+</ol>
+<pre class="code">&lt;xsl:template name="siteinfo-last-published"&gt;
+ &lt;script type="text/javascript"&gt;
+  document.write("&lt;i18n:text &gt;Last Published:&lt;/i18n:text&gt;&amp;#160;" + document.lastModified);
+ &lt;/script&gt;
+&lt;/xsl:template&gt;
+      </pre>
+<p>
+        This allows us in a next maintenance to just change the code of
+        &lt;xsl:template name="siteinfo-last-published"/&gt; and apply it in any position where
+        it is placed.  
+      </p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+        Now this refactoring of the site2xhtml.xsl is exactly what we doing in creating contracts for views.
+      </div>
+</div>
+<a name="N1006E"></a><a name="blankContract"></a>
+<h3 class="underlined_5">Explaining the blank forrest:contract</h3>
+<p>
+        To start a new forrest:contract you can copy the 'blank.ft' from
+        <span class="codefrag">org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates</span>. 
+        The exact file system path can be looked up at <span class="codefrag">http://localhost:8888/ls.contracts.html</span>.
+      </p>
+<p>
+        The 'blank.ft' is a simple xml file with the following code which you can use to base new contracts 
+        on:
+      </p>
+<pre class="code">
+&lt;forrest:contract 
+  xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  name="blank" type="nugget"&gt;
+  
+  &lt;!--NOTE: 
+    When using the blank template as copy-and-paste master,
+    just search and replace 'blank' by the {contract-name}!--&gt;
+  
+  &lt;description&gt;
+    {contract-name} will output {contract-funtion}.
+    This is just a blank contract, it will output *nothing*.
+  &lt;/description&gt;
+  &lt;usage&gt;&lt;![CDATA[&lt;forrest:contract name="blank"/&gt;]]&gt;&lt;/usage&gt;
+  &lt;forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    format="xhtml" name="blank" inputFormat="xsl" body="false" head="false"&gt;
+    &lt;xsl:stylesheet version="1.1" 
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
+        &lt;!--Add here the needed templates--&gt;
+    &lt;/xsl:stylesheet&gt;
+  &lt;/forrest:template&gt;
+&lt;/forrest:contract&gt;
+
+      </pre>
+<p>
+        The most important is the name of the contract <span class="codefrag">&lt;forrest:contract name="blank"/&gt;</span>. 
+        This name is the same as the file name of the contract (without file extension) <span class="codefrag">blank.ft</span>. 
+      </p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">This is a <strong>naming convention</strong> that you need
+        to always meet. All @name attributes must be the file name of the contract without file extension.
+      </div>
+</div>
+<p>
+        The <span class="codefrag">&lt;description/&gt;</span> tag needs to be filled in with some information
+        that is explaining the contract to the webdesigner. The better explained the more efficient
+        for the webdesigner to pick the right contract.
+      </p>
+<pre class="code">&lt;description&gt;
+  siteinfo-last-published-howto will output the last published date of the site with the help of jscript.
+&lt;/description&gt;
+      </pre>
+<p>
+        In the <span class="codefrag">&lt;usage/&gt;</span> tag we have to explain how the designer can use 
+        the contract in his view.
+      </p>
+<pre class="code">&lt;usage&gt;&lt;![CDATA[&lt;forrest:contract name="siteinfo-last-published-howto"/&gt;]]&gt;&lt;/usage&gt;
+      </pre>
+<p>
+        
+<span class="codefrag">&lt;forrest:template name="blank" body="false" head="false"&gt; </span> 
+        That leads to the template attribute @body="true" and
+				@head="false". In xhtml a contract can add content to the &lt;body/&gt; or/and
+				&lt;head/&gt; part of &lt;html/&gt;. These values need to be changed when adding an actual template.
+        Besides this, a xsl-template needs to indicate this in the naming. A template that adds content to the 
+        html body needs to end with "<span class="codefrag">-body</span>"!!!
+      </p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+        It is possible to use contracts in different in/output formats. 
+        We are focussing for now on format="xhtml" as output and the inputFormat="xsl".
+      </div>
+</div>
+<p>
+        A &lt;forrest:template /&gt; has the child &lt;xsl:stylesheet/&gt; where we can create 
+        templates for the html-head and html-body. For adding content into the body of the final 
+        document change @body="true" and add:
+      </p>
+<pre class="code">
+&lt;xsl:stylesheet version="1.1" 
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
+ &lt;!--Add here the needed templates--&gt;
+ &lt;xsl:template name="blank-body"/&gt;
+&lt;/xsl:stylesheet&gt;        
+      </pre>
+<a name="N100BB"></a><a name="newContract"></a>
+<h3 class="underlined_5">Create a new contract</h3>
+<div class="fixme">
+<div class="label">Fixme (thorsten)</div>
+<div class="content">
+        We need to explain basic naming convention for contracts. Like
+        "naming does not say anything about layout position, but functionality of the contract.".
+      </div>
+</div>
+<p> 
+				Now let us pick up the example we started with and create a "siteinfo-last-published-howto" contract.
+        Save the blank.ft to <span class="codefrag">{project.home}/src/documentation/resources/templates/siteinfo-last-published-howto.ft</span>.
+      </p>
+<p>
+        Now the maintenance-optimized code (xpath="/html/body/*") was:
+      </p>
+<pre class="code">
+&lt;xsl:template name="siteinfo-last-published"&gt;
+ &lt;script type="text/javascript"&gt;
+  document.write("&lt;i18n:text &gt;Last Published:&lt;/i18n:text&gt;&amp;#160;" + document.lastModified);
+ &lt;/script&gt;
+&lt;/xsl:template&gt;</pre>
+<p>
+        In this code we have to do the following steps to use it in our contract:
+			</p>
+<ul>
+        
+<li>Search and replace "siteinfo-last-published" with "siteinfo-last-publish-howto-body"</li>
+        
+<li>Add a "debug string - " to the template</li>
+      
+</ul>
+<p>
+        The contract after this steps should look like:
+      </p>
+<pre class="code">
+&lt;xsl:template name="siteinfo-last-publish-howto-body"&gt;
+debug string - 
+ &lt;script type="text/javascript"&gt;
+  document.write("&lt;i18n:text &gt;Last Published:&lt;/i18n:text&gt;&amp;#160;" + document.lastModified);
+ &lt;/script&gt;
+&lt;/xsl:template&gt;</pre>
+<p>Now we have to do some last steps in the siteinfo-last-publish-howto.ft</p>
+<ul>
+        
+<li>Search and replace "blank" with "siteinfo-last-publish-howto"</li>
+        
+<li>Add description and usage of the contract</li>
+        
+<li>Set @body="true"</li>
+        
+<li>Copy the maintenance optimized code to the contract.</li>
+      
+</ul>
+<p>
+        As the result your code should look like this:
+      </p>
+<pre class="code">&lt;forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  name="siteinfo-last-published-howto" type="nugget"&gt;
+  &lt;description&gt;
+    siteinfo-last-published-howto will output the last published date of the site with the help of jscript.
+  &lt;/description&gt;
+  &lt;usage&gt;&lt;![CDATA[&lt;forrest:contract name="siteinfo-last-published-howto"/&gt;]]&gt;&lt;/usage&gt;
+  &lt;forrest:template 
+    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+    xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    format="xhtml" name="siteinfo-last-published-howto" inputFormat="xsl" body="true" head="false"&gt;
+    &lt;xsl:stylesheet version="1.1" 
+        xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
+        &lt;xsl:template name="siteinfo-last-published-howto-body"&gt;
+          debug string - 
+          &lt;script type="text/javascript"&gt;document.write("&lt;i18n:text &gt;Last Published:&lt;/i18n:text&gt;&amp;#160;" + document.lastModified);&lt;/script&gt;
+        &lt;/xsl:template&gt;
+    &lt;/xsl:stylesheet&gt;
+  &lt;/forrest:template&gt;
+&lt;/forrest:contract&gt;
+      </pre>
+<a name="N100FF"></a><a name="viewContract"></a>
+<h3 class="underlined_5">Activating the contract</h3>
+<p>
+        To see whether the new contract works we need to add it to our view.
+        The contract usage contains the contract-tag <span class="codefrag">&lt;forrest:contract name="siteinfo-last-published-howto"/&gt;</span>
+        Please see <a href="../../docs_0_80/howto/howto-view-dsl.html">Getting started with forrest:view DSL</a> for more details.
+      </p>
+<div class="fixme">
+<div class="label">Fixme (thorsten)</div>
+<div class="content">
+        Let us now look into advanced features of views. 
+        I will write a how-to for advanced contracts soon. :)
+      </div>
+</div>
+</div>
+<a name="N10114"></a><a name="Further Reading"></a>
+<h2 class="underlined_10">Further Reading</h2>
+<div class="section">
+<p>
+      Congratulations you are now able to work with view contracts. 
+      From here we recommend to read the following How-To's:
+    </p>
+<ul>
+      
+<li>
+<a href="../../docs_0_80/howto/howto-view-dsl.html">Getting started with forrest:view DSL</a> 
+</li>
+    
+</ul>
+</div>
+<a name="N10125"></a><a name="Feedback"></a>
+<h2 class="underlined_10">Feedback</h2>
+<div class="section">
+<p>
+      Please provide feedback about this document via the
+      <a href="../../mail-lists.html">mailing lists</a>.
+    </p>
+</div>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2002-2005 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Propchange: forrest/site/docs_0_80/howto/howto-structurer-contracts.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/site/docs_0_80/howto/howto-structurer-contracts.pdf
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-structurer-contracts.pdf?rev=321269&view=auto
==============================================================================
Binary file - no diff available.

Propchange: forrest/site/docs_0_80/howto/howto-structurer-contracts.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: forrest/site/docs_0_80/howto/howto-structurer-dsl.html
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-structurer-dsl.html?rev=321269&view=auto
==============================================================================
--- forrest/site/docs_0_80/howto/howto-structurer-dsl.html (added)
+++ forrest/site/docs_0_80/howto/howto-structurer-dsl.html Fri Oct 14 17:42:44 2005
@@ -0,0 +1,686 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8-dev">
+<meta name="Forrest-skin-name" content="pelt">
+<title>How to use the forrest:view config-DSL (v0.8-dev)</title>
+<link type="text/css" href="../../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../../skin/profile.css" rel="stylesheet">
+<script src="../../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../../favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://forrest.apache.org/">forrest</a><script src="../../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://www.apache.org/"><img class="logoImage" alt="Apache" src="../../images/apache-forrest.png" title="The Apache Software Foundation"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://forrest.apache.org/"><img class="logoImage" alt="Forrest" src="../../images/project-logo.gif" title="Apache Forrest"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="forrest.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="base-not-selected" href="../../index.html">Welcome</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../contrib.html">Project</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../versions/index.html">Versioned Docs</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../pluginDocs/index.html">Plugins</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../tools/index.html">Tools</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+             
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">0.80-dev</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/faq.html">FAQs</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/changes.html">Changes</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/todo.html">Todo</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/your-project.html">Using Forrest</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/locationmap.html">Locationmap</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/validation.html">XML Validation</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/linking.html">Menus and Linking</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/searching.html">Searching</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/skins.html">Default Skins</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/skin-package.html">Skin Packages</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/views.html">Views development</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/forrest-contract.html">Our Contract</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/compliance.html">Standards Compliance</a>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15', '../../skin/')" id="menu_selected_1.1.15Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">How-To</div>
+<div id="menu_selected_1.1.15" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-howto.html">Write a How-to</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-dev.html">Be a developer</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-asf-mirror.html">Download mirror</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-pdf-tab.html">Create tab PDF</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-editcss.html">Edit CSS (WYSIWYG)</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-corner-images.html">CSS corner SVG</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-forrest-from-maven.html">Maven Integration</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-buildPlugin.html">Build a Plugin</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-custom-html-source.html">Custom html source</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.15.11', '../../skin/')" id="menu_1.1.15.11Title" class="menutitle">Multipage HowTo</div>
+<div id="menu_1.1.15.11" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/howto-multi.html">Introduction</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step1.html">Step 1</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step2.html">Step 2</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step3.html">Step 3</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15.12', '../../skin/')" id="menu_selected_1.1.15.12Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Dispatcher</div>
+<div id="menu_selected_1.1.15.12" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-install.html">Install</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">forrest:view DSL</div>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-contracts.html">Contract implementations</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.15.13', '../../skin/')" id="menu_1.1.15.13Title" class="menutitle">Old Views (deprecated)</div>
+<div id="menu_1.1.15.13" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-contracts.html">Contract implementations</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.16', '../../skin/')" id="menu_1.1.16Title" class="menutitle">Advanced Topics</div>
+<div id="menu_1.1.16" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/build.html">Building Forrest</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/catalog.html">Using DTD Catalogs</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/sitemap-ref.html">Sitemap Reference</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/project-sitemap.html">Project sitemap</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/cap.html">Sourcetype Action</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/upgrading_08.html">Upgrading to 0.8</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.18', '../../skin/')" id="menu_1.1.18Title" class="menutitle">Reference docs</div>
+<div id="menu_1.1.18" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.1.18.1', '../../skin/')" id="menu_1.1.18.1Title" class="menutitle">DTD documentation</div>
+<div id="menu_1.1.18.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../dtdx/dtd-docs.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v20.dtdx.html">document-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/howto-v20.dtdx.html">howto-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/faq-v20.dtdx.html">faq-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v13.dtdx.html">document-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/howto-v13.dtdx.html">howto-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/faq-v13.dtdx.html">faq-v13</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.18.2', '../../skin/')" id="menu_1.1.18.2Title" class="menutitle">Doc samples</div>
+<div id="menu_1.1.18.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../dtdx/document-v13.html">document-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v20.html">document-v20</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.19', '../../skin/')" id="menu_1.1.19Title" class="menutitle">Older Docs</div>
+<div id="menu_1.1.19" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/primer.html">Forrest Primer</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/libre-intro.html">Libre</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/dreams.html">Dream list</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/cvs-ssh/howto-cvs-ssh.html">CVS over SSH</a>
+</div>
+</div>
+</div>
+<div id="credit">
+<hr>
+        This is documentation for development version v0.8
+       (<a href="http://forrest.apache.org/versions/">More</a>)</div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2">
+<a href="http://apachecon.com/"><img border="0" title="ApacheCon US 2005" alt="ApacheCon US 2005 - logo" src="http://apache.org/images/ac2005us_blue_125x125.jpg" style="width: 125px;height: 125px;"></a>
+</div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="howto-structurer-dsl.pdf"><img alt="PDF -icon" src="../../skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>How to use the forrest:view config-DSL</h1>
+<div class="abstract">
+    This How-To describes the usage of the forrest:view config Domain Specific Language 
+    to create beautiful websites in no time.
+  </div>
+<div id="motd-area">
+        This is documentation for development version v0.8
+       (<a href="http://forrest.apache.org/versions/">More</a>)</div>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Intended Audience">Intended Audience</a>
+</li>
+<li>
+<a href="#Purpose">Purpose</a>
+</li>
+<li>
+<a href="#Prerequisites">Prerequisites</a>
+</li>
+<li>
+<a href="#Steps">Steps</a>
+<ul class="minitoc">
+<li>
+<a href="#emptyView">Empty view file</a>
+</li>
+<li>
+<a href="#firstView">Creating your first view</a>
+</li>
+<li>
+<a href="#hookView">Hooks in views</a>
+</li>
+<li>
+<a href="#cssView">CSS in views</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#Further Reading">Further Reading</a>
+</li>
+<li>
+<a href="#Feedback">Feedback</a>
+</li>
+</ul>
+</div>
+<a name="N10010"></a><a name="Intended Audience"></a>
+<h2 class="underlined_10">Intended Audience</h2>
+<div class="section">
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">
+"Views" are new functionality which is still in development phase. That is why it is in the
+"whiteboard" section of the Forrest distribution.
+This HowTo is far from being finished. 
+</div>
+</div>
+<p>
+      This part of the views is dedicated to webdesigner and user with some knowlegde of css.
+    </p>
+</div>
+<a name="N1001B"></a><a name="Purpose"></a>
+<h2 class="underlined_10">Purpose</h2>
+<div class="section">
+<p>
+      This how-to will show you how to write a <strong>forrest:view</strong> from the ground up. 
+      We will focus on html as the output format. As well it will show how to add your own css implementation to the view.
+    </p>
+</div>
+<a name="N10026"></a><a name="Prerequisites"></a>
+<h2 class="underlined_10">Prerequisites</h2>
+<div class="section">
+<ul>
+      
+<li>
+        You have a ready-to-go new seed (newSeed) based on views as described in <a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>.
+      </li>
+      
+<li>
+      	This includes as well as all additional plugins that are mentioned in <a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>.
+      </li>
+      
+<li>
+        Reading that how-to is as well a good idea to understand the used directory structure in this how-to.
+      </li>
+    
+</ul>
+</div>
+<a name="N1003F"></a><a name="Steps"></a>
+<h2 class="underlined_10">Steps</h2>
+<div class="section">
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+      When developing with views we assume you are using 'forrest run' and the following workflow:<br>
+      change files -&gt; refresh browser
+    </div>
+</div>
+<p>
+      We developed<strong> forrest:view</strong>  to let the user decide where to place elements in e.g. html pages.
+      We started this work with the <span class="codefrag">skinconf.xml</span> where you could configure certain elements and
+      their positions. These elements were known under certain names. It was up to the skin designer to support 
+      this configuration and the elements.
+    </p>
+<p>
+     The work started with grouping elements (the ones from skinconf). We used css-contracts that 
+     we added as @attributes e.g. <span class="codefrag">&lt;div id="content-main"/&gt; </span>. That made it 
+     possible to use the same elements in different skins. For the full list refer to the
+      <a href="http://svn.apache.org/repos/asf/forrest/trunk/main/webapp/skins/leather-dev/contracts.initial.txt">
+        initial contract list
+      </a>
+    
+</p>
+<p>
+     Around this contracts we developed a configuration Domain Specific Language and called it<strong>forrest:view</strong>.
+    These <strong>forrest:view</strong>s allows us to define the order in which <strong>forrest:contract</strong>s appear, and also to group
+     them using <strong>forrest:hook</strong>s.
+    </p>
+<p>
+     
+<strong>forrest:hook</strong>s are containers that are only used for layout reasons. They <strong>do not</strong> add 
+     any content or functionality to the output. They add <strong>only</strong> layout information to 
+     the output. Actually a <span class="codefrag">&lt;forrest:hook name="layoutId"/&gt;</span> will be transformed
+     to <span class="codefrag">&lt;div id="layoutId"/&gt; </span>
+    
+</p>
+<p>
+     
+<strong>forrest:contract</strong>s are functionality or extra content that a skin can use to display the requested
+     document (content-main). Sometimes a contract delivers <strong>format-specific markup</strong>, other times it delivers
+     a <strong>format-independent string</strong>.
+    </p>
+<a name="N10089"></a><a name="emptyView"></a>
+<h3 class="underlined_5">Empty view file</h3>
+<pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"&gt;
+  &lt;forrest:view type="xhtml"&gt;
+  &lt;/forrest:view&gt;
+&lt;/forrest:views&gt;
+      </pre>
+<p>
+       
+<strong> forrest:view</strong>  is designed to be open for any format that can use<strong> forrest:view</strong>  as configuration file.
+	The only format we implemented is xhtml for now. This is as well true for the delivered contracts.
+      </p>
+<p>
+        Now let us start to skin our site.
+      </p>
+<a name="N100A0"></a><a name="firstView"></a>
+<h3 class="underlined_5">Creating your first view</h3>
+<p>
+				In this section we will create a new view. We will override the default view of the view-plugin
+        for the index page of the <a href="../../docs_0_80/howto/howto-view-install.html">newSeed</a>.
+        For that we will create a file called <span class="codefrag">index.fv</span> and save it in our xdocs directory. 
+        This will make <strong>only</strong> the index.html page look different from the rest of the project.
+			</p>
+<p>
+        Remember: pointing your browser to <span class="codefrag">http://localhost:8888/ls.contracts.html</span> will
+        show a page with all contracts that you can use in your project.
+      </p>
+<p>
+        Let use the blank view from the earlier step and add the content-main contract. In 
+        ls.contracts.html we find the information for how to use the contract in our view. Our 
+        <span class="codefrag">index.fv</span> should look like:
+      </p>
+<pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"&gt;
+  &lt;forrest:view type="xhtml"&gt;
+    &lt;forrest:contract name="content-main"/&gt;
+  &lt;/forrest:view&gt;
+&lt;/forrest:views&gt;
+      </pre>
+<p>
+        Lets try our new view by pointing to <span class="codefrag">http://localhost:8888/index.html</span>. 
+        We will see only the main content. Now let us add the section navigation to our view.
+        The contract usage in the view can be looked up in ls.contracts.html. Our view now looks like:
+      </p>
+<pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"&gt;
+  &lt;forrest:view type="xhtml"&gt;
+    &lt;forrest:contract name="content-main"/&gt;
+    &lt;forrest:contract name="nav-section"/&gt;
+  &lt;/forrest:view&gt;
+&lt;/forrest:views&gt;
+      </pre>
+<p>
+        We now find the main content and the section navigation after each other and in the order 
+        we placed them in the view, but we want it next to each other 
+        (left: nav-section; right: content-main).
+      </p>
+<a name="N100D1"></a><a name="hookView"></a>
+<h3 class="underlined_5">Hooks in views</h3>
+<p>
+        We will use now the first time a <span class="codefrag">&lt;forrest:hook name="layoutId"/&gt;</span>.
+        Hooks are the styling side of views. We can imitate arbitrary html skeleton 
+        with their help. Before we explain how to use your own css in views, we will use the default css.
+        In the default.css we can find 
+      </p>
+<pre class="code">/* menu */
+#leftbar {
+    width: 25%;
+    float: left;
+    background: #eae8e3;
+    border: thin dashed #565248;
+}
+      </pre>
+<p>
+        With this information we know to use <span class="codefrag">&lt;forrest:hook name="leftbar"/&gt;</span> 
+        and add contracts into that container. 
+      </p>
+<p>
+        If we want to put the nav-section contract into the left-hand side position
+        of the site we need to place the contract into that hook. Like:
+      </p>
+<pre class="code">&lt;forrest:hook name="leftbar"&gt;
+  &lt;forrest:contract name="nav-section"/&gt;
+&lt;/forrest:hook&gt;
+			</pre>
+<p>
+        Our view will then look like:
+      </p>
+<pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" &gt;
+  &lt;forrest:view type="xhtml"&gt;
+    &lt;forrest:hook name="leftbar"&gt;
+      &lt;forrest:contract name="nav-section"/&gt;
+    &lt;/forrest:hook&gt;
+    &lt;forrest:contract name="content-main"/&gt;   
+  &lt;/forrest:view&gt;  
+&lt;/forrest:views&gt;
+      </pre>
+<a name="N100F6"></a><a name="cssView"></a>
+<h3 class="underlined_5">CSS in views</h3>
+<p>
+        We now know how to place contracts and hooks in our view. Until this stage we only used the default.css. 
+        CSS-support of views is as easy as placing contracts/hooks. To override the default.css
+        stylesheet we use another tag within our view <span class="codefrag">&lt;forrest:css url="default.css"/&gt;</span>.
+      </p>
+<p>
+        We will now create a file in <span class="codefrag">{project:skins-dir}{path}/{name}.css</span>. In our case
+        we will save a file called howTo.css in newSeed/src/documentation/skins/css/howTo.css containing only 
+        the following css:
+      </p>
+<pre class="code">/* menu */
+#leftbar {
+    width: 25%;
+    float: left;
+    background: #CCCCFF;
+    border: thin solid #000000;
+}
+      </pre>
+<p>
+        We just changed the border-style to 'solid', the background to '#CCCCFF' and the color to '#000000'. 
+        Now we have to add a new tag to tell that we want to override the default.css. We are doing this 
+        by adding the tag <span class="codefrag">&lt;forrest:css url="howTo.css"/&gt;</span> to our view.
+      </p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+        
+<span class="codefrag">&lt;forrest:css url="howTo.css"/&gt;</span> needs to be the direct child of 
+        <span class="codefrag">&lt;forrest:view type="xhtml"&gt;</span>
+      
+</div>
+</div>
+<pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" &gt;
+  &lt;forrest:view type="xhtml"&gt;
+  	&lt;forrest:css url="howTo.css"/&gt;
+    &lt;forrest:hook name="leftbar"&gt;
+      &lt;forrest:contract name="nav-section"/&gt;
+    &lt;/forrest:hook&gt;
+    &lt;forrest:contract name="content-main"/&gt;   
+  &lt;/forrest:view&gt;  
+&lt;/forrest:views&gt;
+      </pre>
+<p>
+        Now you see a white page where the menu is surrounded by a solid border with the defined background.
+         As a second example, let us change as well the content-main by adding another hook 
+         <span class="codefrag">&lt;forrest:hook name="content"/&gt;</span> We need to add the new layout container
+         to our howTo.css:
+      </p>
+<pre class="code">
+/* The actual content */
+#content {
+    margin-left: 25%;
+    padding: 0 20px 0 20px;
+    background: #B9D3EE;
+}
+      </pre>
+<p>
+        Then we have to add the 'content-main' contract to the 'content' hook.
+        The resulting view looks like:
+      </p>
+<pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" &gt;
+  &lt;forrest:view type="xhtml"&gt;
+  	&lt;forrest:css url="howTo.css"/&gt;
+    &lt;forrest:hook name="leftbar"&gt;
+      &lt;forrest:contract name="nav-section"/&gt;
+    &lt;/forrest:hook&gt;
+    &lt;forrest:hook name="content"&gt;
+      &lt;forrest:contract name="content-main"/&gt;
+    &lt;/forrest:hook&gt;  
+  &lt;/forrest:view&gt;  
+&lt;/forrest:views&gt;
+      </pre>
+<p>
+        We are now able to place contracts into the layout container and add custom css to the view.
+      </p>
+<div class="fixme">
+<div class="label">Fixme (thorsten)</div>
+<div class="content">
+        Let us now look into advanced features of views. 
+        I will write a how-to for advanced contracts soon. :)
+      </div>
+</div>
+</div>
+<a name="N1013A"></a><a name="Further Reading"></a>
+<h2 class="underlined_10">Further Reading</h2>
+<div class="section">
+<p>
+      Congratulations you are now able to work with the view DSL. 
+      From here we recommend to read the following How-Tos:
+    </p>
+<ul>
+      
+<li>
+<a href="../../docs_0_80/howto/howto-view-contracts.html">Create your own contract implementation</a> 
+</li>
+    
+</ul>
+</div>
+<a name="N1014B"></a><a name="Feedback"></a>
+<h2 class="underlined_10">Feedback</h2>
+<div class="section">
+<p>
+      Please provide feedback about this document via the
+      <a href="../../mail-lists.html">mailing lists</a>.
+    </p>
+</div>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2002-2005 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Propchange: forrest/site/docs_0_80/howto/howto-structurer-dsl.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/site/docs_0_80/howto/howto-structurer-dsl.pdf
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-structurer-dsl.pdf?rev=321269&view=auto
==============================================================================
Binary file - no diff available.

Propchange: forrest/site/docs_0_80/howto/howto-structurer-dsl.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: forrest/site/docs_0_80/howto/howto-structurer-install.html
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-structurer-install.html?rev=321269&view=auto
==============================================================================
--- forrest/site/docs_0_80/howto/howto-structurer-install.html (added)
+++ forrest/site/docs_0_80/howto/howto-structurer-install.html Fri Oct 14 17:42:44 2005
@@ -0,0 +1,570 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8-dev">
+<meta name="Forrest-skin-name" content="pelt">
+<title>How to install the views (v0.8-dev)</title>
+<link type="text/css" href="../../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../../skin/profile.css" rel="stylesheet">
+<script src="../../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../../favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://forrest.apache.org/">forrest</a><script src="../../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://www.apache.org/"><img class="logoImage" alt="Apache" src="../../images/apache-forrest.png" title="The Apache Software Foundation"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://forrest.apache.org/"><img class="logoImage" alt="Forrest" src="../../images/project-logo.gif" title="Apache Forrest"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="forrest.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="base-not-selected" href="../../index.html">Welcome</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../contrib.html">Project</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../versions/index.html">Versioned Docs</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../pluginDocs/index.html">Plugins</a>
+</li>
+<li>
+<a class="base-not-selected" href="../../tools/index.html">Tools</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+             
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">0.80-dev</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/faq.html">FAQs</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/changes.html">Changes</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/todo.html">Todo</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/your-project.html">Using Forrest</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/locationmap.html">Locationmap</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/validation.html">XML Validation</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/linking.html">Menus and Linking</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/searching.html">Searching</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/skins.html">Default Skins</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/skin-package.html">Skin Packages</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/views.html">Views development</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/forrest-contract.html">Our Contract</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/compliance.html">Standards Compliance</a>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15', '../../skin/')" id="menu_selected_1.1.15Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">How-To</div>
+<div id="menu_selected_1.1.15" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/index.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-howto.html">Write a How-to</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-dev.html">Be a developer</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-asf-mirror.html">Download mirror</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-pdf-tab.html">Create tab PDF</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-editcss.html">Edit CSS (WYSIWYG)</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-corner-images.html">CSS corner SVG</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-forrest-from-maven.html">Maven Integration</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-buildPlugin.html">Build a Plugin</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-custom-html-source.html">Custom html source</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.15.11', '../../skin/')" id="menu_1.1.15.11Title" class="menutitle">Multipage HowTo</div>
+<div id="menu_1.1.15.11" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/howto-multi.html">Introduction</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step1.html">Step 1</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step2.html">Step 2</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/multi/step3.html">Step 3</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15.12', '../../skin/')" id="menu_selected_1.1.15.12Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Dispatcher</div>
+<div id="menu_selected_1.1.15.12" class="selectedmenuitemgroup" style="display: block;">
+<div class="menupage">
+<div class="menupagetitle">Install</div>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-contracts.html">Contract implementations</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.15.13', '../../skin/')" id="menu_1.1.15.13Title" class="menutitle">Old Views (deprecated)</div>
+<div id="menu_1.1.15.13" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-view-contracts.html">Contract implementations</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.16', '../../skin/')" id="menu_1.1.16Title" class="menutitle">Advanced Topics</div>
+<div id="menu_1.1.16" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/build.html">Building Forrest</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/catalog.html">Using DTD Catalogs</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/sitemap-ref.html">Sitemap Reference</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/project-sitemap.html">Project sitemap</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/cap.html">Sourcetype Action</a>
+</div>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/upgrading_08.html">Upgrading to 0.8</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.18', '../../skin/')" id="menu_1.1.18Title" class="menutitle">Reference docs</div>
+<div id="menu_1.1.18" class="menuitemgroup">
+<div onclick="SwitchMenu('menu_1.1.18.1', '../../skin/')" id="menu_1.1.18.1Title" class="menutitle">DTD documentation</div>
+<div id="menu_1.1.18.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../dtdx/dtd-docs.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v20.dtdx.html">document-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/howto-v20.dtdx.html">howto-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/faq-v20.dtdx.html">faq-v20</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v13.dtdx.html">document-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/howto-v13.dtdx.html">howto-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/faq-v13.dtdx.html">faq-v13</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.18.2', '../../skin/')" id="menu_1.1.18.2Title" class="menutitle">Doc samples</div>
+<div id="menu_1.1.18.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../dtdx/document-v13.html">document-v13</a>
+</div>
+<div class="menuitem">
+<a href="../../dtdx/document-v20.html">document-v20</a>
+</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.1.19', '../../skin/')" id="menu_1.1.19Title" class="menutitle">Older Docs</div>
+<div id="menu_1.1.19" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/primer.html">Forrest Primer</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/libre-intro.html">Libre</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/dreams.html">Dream list</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/cvs-ssh/howto-cvs-ssh.html">CVS over SSH</a>
+</div>
+</div>
+</div>
+<div id="credit">
+<hr>
+        This is documentation for development version v0.8
+       (<a href="http://forrest.apache.org/versions/">More</a>)</div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2">
+<a href="http://apachecon.com/"><img border="0" title="ApacheCon US 2005" alt="ApacheCon US 2005 - logo" src="http://apache.org/images/ac2005us_blue_125x125.jpg" style="width: 125px;height: 125px;"></a>
+</div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="howto-structurer-install.pdf"><img alt="PDF -icon" src="../../skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>How to install the views</h1>
+<div class="abstract">
+    This How-To describes the setup of the plugins (needed to work with forrest:views and forrest:contracts) and a fresh seed site.
+  </div>
+<div id="motd-area">
+        This is documentation for development version v0.8
+       (<a href="http://forrest.apache.org/versions/">More</a>)</div>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Intended Audience">Intended Audience</a>
+</li>
+<li>
+<a href="#Purpose">Purpose</a>
+</li>
+<li>
+<a href="#Prerequisites">Prerequisites</a>
+</li>
+<li>
+<a href="#Steps">Steps</a>
+<ul class="minitoc">
+<li>
+<a href="#localBuild">Build the internal.structurer and the output.themes plugins</a>
+</li>
+<li>
+<a href="#jxpath">Upgrade the JXPath library</a>
+</li>
+<li>
+<a href="#newSeed">Seed a new project</a>
+</li>
+<li>
+<a href="#forrestProperties">Modifying forrest.properties</a>
+</li>
+<li>
+<a href="#testing">Test your new view based project</a>
+</li>
+<li>
+<a href="#availableContracts">Available contracts</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#Further Reading">Further Reading</a>
+</li>
+<li>
+<a href="#Feedback">Feedback</a>
+</li>
+</ul>
+</div>
+<a name="N10010"></a><a name="Intended Audience"></a>
+<h2 class="underlined_10">Intended Audience</h2>
+<div class="section">
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">
+"Views" are new functionality which is still in development phase. That is why it is in the
+"whiteboard" section of the Forrest distribution.
+This HowTo is a good start but still needs more work.
+</div>
+</div>
+<p>
+      Developers who want to get started with view development.
+    </p>
+</div>
+<a name="N1001B"></a><a name="Purpose"></a>
+<h2 class="underlined_10">Purpose</h2>
+<div class="section">
+<p>
+      To help with installing views. This is the "getting started" setup guide.
+    </p>
+</div>
+<a name="N10023"></a><a name="Prerequisites"></a>
+<h2 class="underlined_10">Prerequisites</h2>
+<div class="section">
+<ul>
+      
+<li>Need the SVN trunk version of Forrest for using views because it is in an early stage.</li>
+      
+<li>Read <a href="../../docs_0_80/howto/howto-buildPlugin.html">How to Build a Plugin</a>
+        especially the section about using Forrest's own Ant.</li>
+    
+</ul>
+</div>
+<a name="N10035"></a><a name="Steps"></a>
+<h2 class="underlined_10">Steps</h2>
+<div class="section">
+<p>
+      The process of setting up the plugin is quite heavy. We promise it will be easier in the future. 
+      Some of the instructions need to be modified with your local settings.
+    </p>
+<a name="N1003D"></a><a name="localBuild"></a>
+<h3 class="underlined_5">Build the internal.structurer and the output.themes plugins</h3>
+<p>
+        The first step is to build and deploy the internal.structurer and the output.themes plugins. Change to a terminal window of your choice
+        and go (cd) to the trunk version of forrest {forrest-trunk}. Then do an SVN update and after this 
+        deploy both plugins locally.
+      </p>
+<pre class="code">
+cd {forrest-trunk}
+svn up
+cd whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/
+ant local-deploy
+cd ../org.apache.forrest.plugin.output.themes/
+ant local-deploy
+      </pre>
+<p>
+        Alternatively, run the script <span class="codefrag">etc/structurer.sh</span>
+      
+</p>
+<a name="N10051"></a><a name="jxpath"></a>
+<h3 class="underlined_5">Upgrade the JXPath library</h3>
+<p> 
+        Replace lib/core/commons-jxpath-20030909.jar with commons-jxpath-1.2.jar
+      </p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+That will introduce Issue
+<a href="http://issues.apache.org/jira/browse/FOR-675">FOR-675</a>
+- please help to fix it.
+</div>
+</div>
+<a name="N10062"></a><a name="newSeed"></a>
+<h3 class="underlined_5">Seed a new project</h3>
+<p> 
+	Go to the directory where you want to seed a new project and seed it. 
+      </p>
+<pre class="code">
+cd ~/src/newSeed
+forrest seed
+      </pre>
+<a name="N10070"></a><a name="forrestProperties"></a>
+<h3 class="underlined_5">Modifying forrest.properties</h3>
+<p>
+        Tell forrest that we are using the view plugins. Edit
+        forrest.properties to add the required plugins:
+      </p>
+<pre class="code">
+project.required.plugins=org.apache.forrest.plugin.output.themes,org.apache.forrest.plugin.internal.structurer
+      </pre>
+<p>
+	     Change the project skin to leather-dev. The reason is that the plugins are still
+       not independent from the "old fashion skins".  
+      </p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">We are exchanging only
+	     site2xhtml.xsl of leather-dev skin with the plugins, and some contracts are based
+	     on e.g. document2html.xsl output of leather-dev.</div>
+</div>
+<pre class="code">
+project.skin=leather-dev
+      </pre>
+<a name="N10088"></a><a name="testing"></a>
+<h3 class="underlined_5">Test your new view based project</h3>
+<p> 
+        Now you have finished the preparation and the setup to finally do
+      </p>
+<pre class="code">
+forrest run
+      </pre>
+<p>Then point to <span class="codefrag">http://localhost:8888/</span> and you will see the default
+        views-based site.</p>
+<a name="N1009C"></a><a name="availableContracts"></a>
+<h3 class="underlined_5">Available contracts</h3>
+<p> 
+	     To start working with views, you need to know which contracts you can use. 
+	     For this we will install another plugin <span class="codefrag">org.apache.forrest.plugin.input.viewHelper.xhtml.ls</span>.
+	     The setup is:
+	    </p>
+<pre class="code">
+cd {forrest-trunk}
+svn up
+cd whiteboard/plugins/org.apache.forrest.plugin.input.viewHelper.xhtml.ls/
+ant local-deploy
+</pre>
+<p>
+        The newly installed plugin will show the available contracts as html pages.
+        First we have to tell Forrest that we are planning to use the new plugin. We will do that
+        by editing the forrest.properties of the <a href="#newSeed">newSeed</a> 
+        to add the plugin:
+      </p>
+<pre class="code">
+project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls
+      </pre>
+<p>
+        Now point your browser to <span class="codefrag">http://localhost:8888/ls.contracts.html</span>. 
+        On this page you will find all contracts that you can use in your project.
+      </p>
+</div>
+<a name="N100BE"></a><a name="Further Reading"></a>
+<h2 class="underlined_10">Further Reading</h2>
+<div class="section">
+<p>
+      Congratulations you are now able to work with views. 
+      From here we recommend to read the following How-To's:
+    </p>
+<ul>
+      
+<li>
+<a href="../../docs_0_80/howto/howto-view-dsl.html">Getting started with forrest:view DSL</a> 
+</li>
+      
+<li>
+<a href="../../docs_0_80/howto/howto-view-contracts.html">Create your own contract implementation</a> 
+</li>
+    
+</ul>
+</div>
+<a name="N100D5"></a><a name="Feedback"></a>
+<h2 class="underlined_10">Feedback</h2>
+<div class="section">
+<p>
+      Please provide feedback about this document via the "dev"
+      <a href="../../mail-lists.html">mailing list</a>.
+    </p>
+</div>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2002-2005 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Propchange: forrest/site/docs_0_80/howto/howto-structurer-install.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/site/docs_0_80/howto/howto-structurer-install.pdf
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-structurer-install.pdf?rev=321269&view=auto
==============================================================================
Binary file - no diff available.

Propchange: forrest/site/docs_0_80/howto/howto-structurer-install.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Modified: forrest/site/docs_0_80/howto/howto-view-contracts.html
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-view-contracts.html?rev=321269&r1=321268&r2=321269&view=diff
==============================================================================
--- forrest/site/docs_0_80/howto/howto-view-contracts.html (original)
+++ forrest/site/docs_0_80/howto/howto-view-contracts.html Fri Oct 14 17:42:44 2005
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.8-dev">
 <meta name="Forrest-skin-name" content="pelt">
-<title>How to write a forrest:contract? (v0.8-dev)</title>
+<title>How to write a forrest:contract? (deprecated) (v0.8-dev)</title>
 <link type="text/css" href="../../skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="../../skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="../../skin/print.css" rel="stylesheet">
@@ -199,8 +199,20 @@
 <a href="../../docs_0_80/howto/multi/step3.html">Step 3</a>
 </div>
 </div>
-<div onclick="SwitchMenu('menu_selected_1.1.15.12', '../../skin/')" id="menu_selected_1.1.15.12Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Views</div>
-<div id="menu_selected_1.1.15.12" class="selectedmenuitemgroup" style="display: block;">
+<div onclick="SwitchMenu('menu_1.1.15.12', '../../skin/')" id="menu_1.1.15.12Title" class="menutitle">Dispatcher</div>
+<div id="menu_1.1.15.12" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-install.html">Install</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-contracts.html">Contract implementations</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15.13', '../../skin/')" id="menu_selected_1.1.15.13Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Old Views (deprecated)</div>
+<div id="menu_selected_1.1.15.13" class="selectedmenuitemgroup" style="display: block;">
 <div class="menuitem">
 <a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>
 </div>
@@ -208,7 +220,7 @@
 <a href="../../docs_0_80/howto/howto-view-dsl.html">forrest:view DSL</a>
 </div>
 <div class="menupage">
-<div class="menupagetitle">contract implementations</div>
+<div class="menupagetitle">Contract implementations</div>
 </div>
 </div>
 </div>
@@ -314,7 +326,7 @@
 	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
 	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
 </div>
-<h1>How to write a forrest:contract?</h1>
+<h1>How to write a forrest:contract? (deprecated)</h1>
 <div class="abstract">
     This How-To will explain how we wrote the contracts for views and hope afterwards you will be able to do the same.
   </div>
@@ -368,13 +380,21 @@
 This HowTo is a good start but still needs more work.
 </div>
 </div>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">
+This document relates to an early development version of "views".
+Please use the current development instead. Start at
+<a href="../../docs_0_80/howto/howto-structurer-install.html">howto-structurer-install</a>.
+</div>
+</div>
 <p>
       Devs and skin developer that wants to get started with forrest:contract development. 
       To really understand this how-to you need basic and sometimes advanced understanding of 
       the "old fashion" skin development process.
     </p>
 </div>
-<a name="N1001B"></a><a name="Purpose"></a>
+<a name="N10022"></a><a name="Purpose"></a>
 <h2 class="underlined_10">Purpose</h2>
 <div class="section">
 <p>
@@ -382,7 +402,7 @@
       how this forrest:contract work with the core parts of forrest.
     </p>
 </div>
-<a name="N10023"></a><a name="Prerequisites"></a>
+<a name="N1002A"></a><a name="Prerequisites"></a>
 <h2 class="underlined_10">Prerequisites</h2>
 <div class="section">
 <ul>
@@ -401,7 +421,7 @@
     
 </ul>
 </div>
-<a name="N1003C"></a><a name="Steps"></a>
+<a name="N10043"></a><a name="Steps"></a>
 <h2 class="underlined_10">Steps</h2>
 <div class="section">
 <div class="note">
@@ -430,7 +450,7 @@
 + Published:&lt;/i18n:text&gt;&amp;#160;" + document.lastModified);
 
     </pre>
-<a name="N10051"></a><a name="enhanceMaintenance"></a>
+<a name="N10058"></a><a name="enhanceMaintenance"></a>
 <h3 class="underlined_5">Enhance the maintenance</h3>
 <p>Now we can enhance the maintenance for the future and we give these code snippets 
         contracts names (based on their functionality). This naming enables us to keep
@@ -461,7 +481,7 @@
         Now this refactoring of the site2xhtml.xsl is exactly what we doing in creating contracts for views.
       </div>
 </div>
-<a name="N1006E"></a><a name="blankContract"></a>
+<a name="N10075"></a><a name="blankContract"></a>
 <h3 class="underlined_5">Explaining the blank forrest:contract</h3>
 <p>
         To start a new forrest:contract you can copy the 'blank.ft' from
@@ -549,7 +569,7 @@
  &lt;xsl:template name="blank-body"/&gt;
 &lt;/xsl:stylesheet&gt;        
       </pre>
-<a name="N100BB"></a><a name="newContract"></a>
+<a name="N100C2"></a><a name="newContract"></a>
 <h3 class="underlined_5">Create a new contract</h3>
 <div class="fixme">
 <div class="label">Fixme (thorsten)</div>
@@ -627,7 +647,7 @@
   &lt;/forrest:template&gt;
 &lt;/forrest:contract&gt;
       </pre>
-<a name="N100FF"></a><a name="viewContract"></a>
+<a name="N10106"></a><a name="viewContract"></a>
 <h3 class="underlined_5">Activating the contract</h3>
 <p>
         To see whether the new contract works we need to add it to our view.
@@ -642,7 +662,7 @@
       </div>
 </div>
 </div>
-<a name="N10114"></a><a name="Further Reading"></a>
+<a name="N1011B"></a><a name="Further Reading"></a>
 <h2 class="underlined_10">Further Reading</h2>
 <div class="section">
 <p>
@@ -657,7 +677,7 @@
     
 </ul>
 </div>
-<a name="N10125"></a><a name="Feedback"></a>
+<a name="N1012C"></a><a name="Feedback"></a>
 <h2 class="underlined_10">Feedback</h2>
 <div class="section">
 <p>

Modified: forrest/site/docs_0_80/howto/howto-view-contracts.pdf
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-view-contracts.pdf?rev=321269&r1=321268&r2=321269&view=diff
==============================================================================
Binary files - no diff available.

Modified: forrest/site/docs_0_80/howto/howto-view-dsl.html
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-view-dsl.html?rev=321269&r1=321268&r2=321269&view=diff
==============================================================================
--- forrest/site/docs_0_80/howto/howto-view-dsl.html (original)
+++ forrest/site/docs_0_80/howto/howto-view-dsl.html Fri Oct 14 17:42:44 2005
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.8-dev">
 <meta name="Forrest-skin-name" content="pelt">
-<title>How to use the forrest:view config-DSL (v0.8-dev)</title>
+<title>How to use the forrest:view config-DSL (deprecated) (v0.8-dev)</title>
 <link type="text/css" href="../../skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="../../skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="../../skin/print.css" rel="stylesheet">
@@ -199,8 +199,20 @@
 <a href="../../docs_0_80/howto/multi/step3.html">Step 3</a>
 </div>
 </div>
-<div onclick="SwitchMenu('menu_selected_1.1.15.12', '../../skin/')" id="menu_selected_1.1.15.12Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Views</div>
-<div id="menu_selected_1.1.15.12" class="selectedmenuitemgroup" style="display: block;">
+<div onclick="SwitchMenu('menu_1.1.15.12', '../../skin/')" id="menu_1.1.15.12Title" class="menutitle">Dispatcher</div>
+<div id="menu_1.1.15.12" class="menuitemgroup">
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-install.html">Install</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-dsl.html">forrest:view DSL</a>
+</div>
+<div class="menuitem">
+<a href="../../docs_0_80/howto/howto-structurer-contracts.html">Contract implementations</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.15.13', '../../skin/')" id="menu_selected_1.1.15.13Title" class="menutitle" style="background-image: url('../../skin/images/chapter_open.gif');">Old Views (deprecated)</div>
+<div id="menu_selected_1.1.15.13" class="selectedmenuitemgroup" style="display: block;">
 <div class="menuitem">
 <a href="../../docs_0_80/howto/howto-view-install.html">Install views</a>
 </div>
@@ -208,7 +220,7 @@
 <div class="menupagetitle">forrest:view DSL</div>
 </div>
 <div class="menuitem">
-<a href="../../docs_0_80/howto/howto-view-contracts.html">contract implementations</a>
+<a href="../../docs_0_80/howto/howto-view-contracts.html">Contract implementations</a>
 </div>
 </div>
 </div>
@@ -314,7 +326,7 @@
 	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
 	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
 </div>
-<h1>How to use the forrest:view config-DSL</h1>
+<h1>How to use the forrest:view config-DSL (deprecated)</h1>
 <div class="abstract">
     This How-To describes the usage of the forrest:view config Domain Specific Language 
     to create beautiful websites in no time.
@@ -369,11 +381,19 @@
 This HowTo is far from being finished. 
 </div>
 </div>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">
+This document relates to an early development version of "views".
+Please use the current development instead. Start at
+<a href="../../docs_0_80/howto/howto-structurer-install.html">howto-structurer-install</a>.
+</div>
+</div>
 <p>
       This part of the views is dedicated to webdesigner and user with some knowlegde of css.
     </p>
 </div>
-<a name="N1001B"></a><a name="Purpose"></a>
+<a name="N10022"></a><a name="Purpose"></a>
 <h2 class="underlined_10">Purpose</h2>
 <div class="section">
 <p>
@@ -381,7 +401,7 @@
       We will focus on html as the output format. As well it will show how to add your own css implementation to the view.
     </p>
 </div>
-<a name="N10026"></a><a name="Prerequisites"></a>
+<a name="N1002D"></a><a name="Prerequisites"></a>
 <h2 class="underlined_10">Prerequisites</h2>
 <div class="section">
 <ul>
@@ -400,7 +420,7 @@
     
 </ul>
 </div>
-<a name="N1003F"></a><a name="Steps"></a>
+<a name="N10046"></a><a name="Steps"></a>
 <h2 class="underlined_10">Steps</h2>
 <div class="section">
 <div class="note">
@@ -444,7 +464,7 @@
      document (content-main). Sometimes a contract delivers <strong>format-specific markup</strong>, other times it delivers
      a <strong>format-independent string</strong>.
     </p>
-<a name="N10089"></a><a name="emptyView"></a>
+<a name="N10090"></a><a name="emptyView"></a>
 <h3 class="underlined_5">Empty view file</h3>
 <pre class="code">&lt;forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"&gt;
   &lt;forrest:view type="xhtml"&gt;
@@ -459,7 +479,7 @@
 <p>
         Now let us start to skin our site.
       </p>
-<a name="N100A0"></a><a name="firstView"></a>
+<a name="N100A7"></a><a name="firstView"></a>
 <h3 class="underlined_5">Creating your first view</h3>
 <p>
 				In this section we will create a new view. We will override the default view of the view-plugin
@@ -499,7 +519,7 @@
         we placed them in the view, but we want it next to each other 
         (left: nav-section; right: content-main).
       </p>
-<a name="N100D1"></a><a name="hookView"></a>
+<a name="N100D8"></a><a name="hookView"></a>
 <h3 class="underlined_5">Hooks in views</h3>
 <p>
         We will use now the first time a <span class="codefrag">&lt;forrest:hook name="layoutId"/&gt;</span>.
@@ -539,7 +559,7 @@
   &lt;/forrest:view&gt;  
 &lt;/forrest:views&gt;
       </pre>
-<a name="N100F6"></a><a name="cssView"></a>
+<a name="N100FD"></a><a name="cssView"></a>
 <h3 class="underlined_5">CSS in views</h3>
 <p>
         We now know how to place contracts and hooks in our view. Until this stage we only used the default.css. 
@@ -624,7 +644,7 @@
       </div>
 </div>
 </div>
-<a name="N1013A"></a><a name="Further Reading"></a>
+<a name="N10141"></a><a name="Further Reading"></a>
 <h2 class="underlined_10">Further Reading</h2>
 <div class="section">
 <p>
@@ -639,7 +659,7 @@
     
 </ul>
 </div>
-<a name="N1014B"></a><a name="Feedback"></a>
+<a name="N10152"></a><a name="Feedback"></a>
 <h2 class="underlined_10">Feedback</h2>
 <div class="section">
 <p>

Modified: forrest/site/docs_0_80/howto/howto-view-dsl.pdf
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-view-dsl.pdf?rev=321269&r1=321268&r2=321269&view=diff
==============================================================================
Binary files - no diff available.

Modified: forrest/site/docs_0_80/howto/howto-view-install.pdf
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-view-install.pdf?rev=321269&r1=321268&r2=321269&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message