Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 20691 invoked from network); 25 Mar 2005 21:18:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Mar 2005 21:18:02 -0000 Received: (qmail 59737 invoked by uid 500); 25 Mar 2005 21:18:02 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 59521 invoked by uid 500); 25 Mar 2005 21:18:01 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@forrest.apache.org Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 59508 invoked by uid 99); 25 Mar 2005 21:18:01 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from natnoddy.rzone.de (HELO natnoddy.rzone.de) (81.169.145.166) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 25 Mar 2005 13:18:00 -0800 Received: from 192.168.2.2 ([80.26.180.26]) by post.webmailer.de (8.13.1/8.13.1) with ESMTP id j2PLHsUs004256 for ; Fri, 25 Mar 2005 22:17:55 +0100 (MET) Subject: [HEADS-UP] fbits plugin is now org.apache.forrest.plugin.views From: Thorsten Scherler To: dev@forrest.apache.org Content-Type: text/plain Date: Fri, 25 Mar 2005 22:17:53 +0100 Message-Id: <1111785473.14416.24.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello devs, I cleaned up the fbits plugin by moving all important stuff to org.apache.forrest.plugin.views and deleting the fbits plugin. The org.apache.forrest.plugin.views is overriding the last step of the skin-it pipe. So far all needed resources (img,..) are stored in the leather-dev skin. I am still using great parts of those skin pipes. The default implementation of the css is based on the scale-dev css enhancement of leather-dev. If you are planing to use this plugin make sure you set your forrest.properties like follows (,... means all other plugins you need): project.skin=leather-dev project.required.plugins=org.apache.forrest.plugin.views,... How it works ************ (taken from SOME comments of the output.xmap of views) This plugin has three components: 1. fbits - delivers contracts in form of xsl:templates 2. nuggets - delivers content that is used in the contracts 3. views - prepares and transforms the requested contracts (fbits) and populate them with the content (nuggets) request request +-------+<<--------+-------+-------->>+---------+ | fbits | | views + | nuggets | +-------+-------->>+-------+<<--------+---------+ response response 1. fbits This is the template producing factory. a. -> Resolving factory Project implementation of templates have priority before default ones. If no implementation can be found we use the noFt (~ - no forrest:template) implementation. b. Get the xsl:templates of the requested contract and specific format. c. Get the forrest:properties of the requested contract. This will determine which templates (css, head, body) we have to call later on GENERAL: Contracts are stored in forrest:templates ({contract-name}.ft) please have look on plugins/org.apache.forrest.plugin.views/resources/templates/*.ft do get an idea how your own implementation have to look like. 2. nuggets This is the content producing factory. NOTE: The current factory uses the skin producing templates (e.g. document2xhtml.xsl). It is only exchanging the last step of a skin producing pipe (site2xhtml.xsl) till now. This will have to be changed in the future. 3. views prepares and transforms the requested contracts (fbits) and populate them with the content (nuggets). a. -> View config resolver File specific views have priority before default ones. If no view can be found in the project we use the default one of the views plugin. b. Aggregate the contract-templates requested by the view with xinclude. The result is a stylesheet with all needed xsl:templates. c. Aggregate the forrest:properties requested by the *.fv. The result is an aggregation of properties which defines the templates to be call. d. Aggregate all contracts-templates requested by the view. Create a xsl that can be used for the last step of the transformation of the view. e. -> Last processing step. Here we are overriding the default skin generation. GENERAL: Views are stored in forrest:view ({file-name}.fv) please have look on plugins/org.apache.forrest.plugin.views/src/documentation/default.fv do get an idea how your own implementation have to look like. Known issues ************ - The generation of the linking is not working. - Menu /innermenu templates are added directly. Add support for additional templates support. - Uses resources of leather (document2html.xsl defines the pdf/xml/... link this have to be done by the template). - The views are only working for html so far - The css support and implementation is VERY basic - Only first level files are working - ... Resume ****** The views plugin can be seen as prototype for the next generation skinning of forrest. It is still in early stage but with the cleanup I hope to make it easier for all devs (not only committer) to get the idea and help to enhance it. Some basic and simple hints: a) If you want another implementation of a contract then create a folder "templates" in ${project.resources-dir} and it will be matched before the standard implementation. e.g. feedback contract: This function will output the html feedback information. #feedback { color: black; background: #CFDCED; text-align:center; margin-top: 5px; } #feedback #feedbackto { font-size: 90%; color: black; }
Modified project implementation
The @attributes (body="true" head="false" css="true") of the forrest:template defining which parts of the html page (head, head-css and body) we have to render. The xsl:templates are following the simple naming convention {@name}-(css|head|body). b. If you want a default view for your project then copy the default.fv from the plugin to your ${project.conf-dir} and modify this file. When you want another view for a specific file (e.g. index.html) then copy the default.fv to your ${project.xdocs-dir} and renamed it to e.g. index.fv. I am looking forward for your feedback and support. ;-) salu2 -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)