forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r162022 - in forrest/trunk/plugins/org.apache.forrest.plugin.view: ./ elper/resources/skin/css/ elper/src/documentation/content/xdocs/ resources/stylesheets/ resources/views/ src/documentation/content/xdocs/
Date Wed, 20 Apr 2005 17:04:29 GMT
Author: thorsten
Date: Wed Apr 20 10:04:25 2005
New Revision: 162022

URL: http://svn.apache.org/viewcvs?view=rev&rev=162022
Log:
explained the view concept in more detail. Fixed the css issue about including stylesheet
raised by Diwaker Gupta

Added:
    forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/default.css
  (with props)
    forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/new.css
  (with props)
    forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/profiling.css.xslt
  (with props)
Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.view/forrest.properties
    forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/stylesheets/prepare.xhtml.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/views/default.fv
    forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/index.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/site.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/src/documentation/content/xdocs/index.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.view/forrest.properties
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.view/forrest.properties?view=diff&r1=162021&r2=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.view/forrest.properties (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.view/forrest.properties Wed Apr 20 10:04:25
2005
@@ -27,7 +27,7 @@
 # Specifies name of Forrest skin to use
 #project.skin=tigris
 #project.skin=pelt
-#project.skin=leather-dev
+project.skin=leather-dev
 
 # comma separated list, file:// is supported
 #forrest.skins.descriptors=http://forrest.apache.org/skins/skins.xml,file:///c:/myskins/skins.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/stylesheets/prepare.xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/stylesheets/prepare.xhtml.xsl?view=diff&r1=162021&r2=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/stylesheets/prepare.xhtml.xsl
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/stylesheets/prepare.xhtml.xsl
Wed Apr 20 10:04:25 2005
@@ -20,6 +20,7 @@
     <xsl:namespace-alias result-prefix="xsl" stylesheet-prefix="alias"/>
     <xsl:param name="request"/>
     <xsl:template match="/">
+    	<!--Create the final stylesheet (alias:)-->
         <alias:stylesheet version="1.0">
             <alias:import href="cocoon://commonSite2xhtml"/>
             <alias:import href="cocoon://dotdots"/>
@@ -37,17 +38,28 @@
             <alias:template name="getBody">
                 <xsl:apply-templates select="/*/forrest:view"/>
             </alias:template>
+        	<!--default entry point into the presentation model 'site'-->
             <alias:template match="site">
                 <xhtml>
                     <head>
                         <alias:call-template name="getHead"/>
-                        <link rel="stylesheet" type="text/css">
-                            <xsl:attribute name="href">{$root}skin/basic.css</xsl:attribute>
-                        </link>
-                        <link rel="stylesheet" type="text/css">
-                            <xsl:attribute name="href">{$root}skin/contracts-<xsl:value-of
select="$request"/>.css</xsl:attribute>
-                        </link>
-                        <xsl:apply-templates select="/*/forrest:view/forrest:css"/>
+                    	<!--Test whether there is an own css implemention requested by the
view-->
+                    	<!--*No* forrest:css found in the view-->
+                        <xsl:if test="not(/*/forrest:view/forrest:css)">
+                            <link rel="stylesheet" type="text/css">
+                                <xsl:attribute name="href">{$root}skin/basic.css</xsl:attribute>
+                            </link>
+                            <link rel="stylesheet" type="text/css">
+                                <xsl:attribute name="href">{$root}skin/contracts-<xsl:value-of
select="$request"/>.css</xsl:attribute>
+                            </link>
+                            <link rel="stylesheet" type="text/css">
+                                <xsl:attribute name="href">{$root}skin/profiling.css</xsl:attribute>
+                            </link>
+                        </xsl:if>
+                    	<!-- forrest:css *found* in the view-->
+                        <xsl:if test="/*/forrest:view/forrest:css">
+                            <xsl:apply-templates select="/*/forrest:view/forrest:css"/>
+                        </xsl:if>
                         <title>
                             <alias:value-of select="div[@id='content']/h1"/>
                         </title>
@@ -60,7 +72,7 @@
         </alias:stylesheet>
     </xsl:template>
     <xsl:template match="forrest:view">
-        <xsl:apply-templates select="forrest:hook|forrest:contract"/>
+        <xsl:apply-templates select="*[local-name()!='css']"/>
     </xsl:template>
     <xsl:template match="forrest:hook[@name]">
         <div id="{@name}">

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/views/default.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/views/default.fv?view=diff&r1=162021&r2=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/views/default.fv (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.view/resources/views/default.fv Wed Apr
20 10:04:25 2005
@@ -18,7 +18,7 @@
 
 <forrest:view
   xmlns:forrest="http://apache.org/forrest/templates/1.0" type="xhtml">
-  
+
   <forrest:contract name="meta"/>
   
   <forrest:hook name="container">

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/index.xml?view=diff&r1=162021&r2=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/index.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/index.xml
Wed Apr 20 10:04:25 2005
@@ -18,7 +18,7 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
 <document> 
   <header> 
-    <title>forrest:views - x formats, one config</title>
+    <title>forrest:views - x output formats, one config</title>
     <abstract>This plugin depends on a ViewHelper and a BusinessHelper implementation.</abstract>

   </header> 
   <body> 
@@ -30,20 +30,22 @@
           <a href="ext:corej2eepatterns/patterns/dispatcherView">corej2eepatterns.com</a>
         </p><p>
         A view will be configured by a config file 
-        which basically contains three tags (it is in a really early stage): </p>
+        which basically contains the following tags (it is still evolving): </p>
 <source><![CDATA[<forrest:view type="xhtml">
+  <forrest:css url="default.css"/>
   <forrest:contract name="meta"/>
   <forrest:hook name="container">
    <forrest:contract name="feedback"/>
   </forrest:hook />
 </forrest:view>]]></source>
 <p>The view tag's @type determines the final output format. The idea is to
-configure different output formats via a forrest:views. That means a forrest:views 
-can contain n different forrest:view for n different formats. <br/>
+configure different output formats within a forrest:views. That means a forrest:views 
+can contain n different "forrest:view" configurations for n different formats. <br/>
 In short: x formats, one config. :)</p>
 <source><![CDATA[<forrest:views
   xmlns:forrest="http://apache.org/forrest/templates/1.0">
 <forrest:view type="xhtml">
+  <forrest:css url="default.css"/>
   <forrest:contract name="meta"/>
   <forrest:hook name="container">
    <forrest:contract name="feedback"/>
@@ -57,16 +59,32 @@
 /forrest:views>]]></source>
 </section>
 <section>
-  <title>ViewHelper </title>
-  <p>
+  <title>viewHelper</title>
+  <p>viewHelper class/implementation - a class/implementation which will
+access the presentation model and transform its models. In other words
+it is a presentation producing factory.
+</p>
+<note>The <![CDATA[<forrest:contract name="nav-main"/>]]> expects a certain
model
+(now produced by leather-dev - tab2menu.xsl) to transform it. In the
+future this dependency will be on a businessHelper implementation that
+has to be defined in the view. For now it depends on leather-dev. I
+guess leather-dev is still not dead till the businessHelper plugin comes
+(which will implement the businessHelper of leather-dev). ;-)</note>
+<p>
+Each forrest:css will be transformed into a <![CDATA[<link rel="stylesheet" type="text/css"
url="{$root}skin/{url}">]]> tag (in html
+output [only format that has an implementation]). 
+This tags are designed to help <strong>web-designers</strong> to freely implemend
their own css-implementations for a view.
+</p>
+<p>
 Each forrest:hook will be transformed into a <![CDATA[<div/>]]> tag (in html
 output [only format that has an implementation]). 
-This tags are designed to help web-designers to freely move
+This tags are designed to help <strong>web-designers</strong> to freely move
 around and group contracts into design container.
 </p>
 <p>Each forrest:contract will dispatch a xml file (ViewHelper) that contains
-xsl:stylesheets for the different output formats, a contract can
-implement. For html, the only format that we have implemented so far, we
+xsl:stylesheets (for now, but other implementations to transform the presentation
+ model are/should be possible) for the different output formats of a contract.
+  For html, the only format that we have implemented so far, we
 have three different kind of templates:</p><p>
 <![CDATA[<xsl:templates name="{contract/@name}-css/>]]><br/>
 Here the contract specific css will be stored.
@@ -80,11 +98,27 @@
   </section>
   <section>
     <title>BusinessHelper </title>
+    <p><strong>businessHelper class/implementation </strong>- a class/implementation
which will
+access businessServices to produce models for the presentation model. In
+other word it is a data producing factory.
+</p>
+<note>Right now we are using the default forrest businessHelper (defined
+by the skin you are using). There are contracts that depend on a
+businessHelper implementation of leather-dev (tab2menu.xsl, site2xhtml.xsl,...). 
+We will create a businessHelper plugin to overcome this problem.</note>
   <p>Right now it is implemented for the forrest way of producing the models
 for the view but we will create an independent BusinessHelper to
-access all BusinessServices you may have in your application. </p><p>
-With other words the BusinessHelper we are using right now are in the core. 
-We need to extract them into BusinessHelper classes.</p>
+access all BusinessServices you may have in your application. </p>
+    </section>
+    <section>
+      <title>links</title>
+      <note>There are/were lots of mails on the dev-list. Please, search the list</note>
+      <p>Background mailings around the views concept</p>
+      <ul>
+        <li><a href="ext:mailings/dev/pInfra">[RT] plugin infrastructure</a>
</li>
+        <li><a href="ext:mailings/dev/ftLeather">[RT] Forrest templates for second
generation skining - towards Corium</a> </li>
+      </ul>
+
     </section>
   </body>
 </document>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/site.xml?view=diff&r1=162021&r2=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/site.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/content/xdocs/site.xml
Wed Apr 20 10:04:25 2005
@@ -54,8 +54,26 @@
       <webapp href="docs/your-project.html#webapp"/>
       <dtd-docs href="docs/dtd-docs.html"/>
     </forrest>
+  	<sun href="http://java.sun.com/">
+      <j2ee href="j2ee/">
+        <patterns href="patterns/">
+          <dispatcherView href="DispatcherView.html" />
+        </patterns>
+      </j2ee>
+    </sun>
+    <corej2eepatterns href="http://corej2eepatterns.com/">
+      <patterns href="Patterns2ndEd/">
+        <dispatcherView href="DispatcherView.htm" />
+      </patterns>
+    </corej2eepatterns>
     <cocoon href="http://cocoon.apache.org/"/>
     <xml.apache.org href="http://xml.apache.org/"/>
+  	<mailings href="http://marc.theaimsgroup.com/?">
+  		<dev href="l=forrest-dev&amp;">
+  			<pInfra href="m=110019697426791&amp;w=2"/>
+  			<ftLeather href="m=109959086204887&amp;w=2"/>
+  		</dev>
+  	</mailings>
   </external-refs>
 
 </site>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/default.css
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/default.css?view=auto&rev=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/default.css
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/default.css
Wed Apr 20 10:04:25 2005
@@ -0,0 +1,282 @@
+/*============HTML tags==========================*/
+body {
+	text-align:center;
+	font-family: verdana, helvetica, sans;
+	font-size: 8pt;
+}
+img {border:0;}
+hr {border:0px; height: 1px; background-color:#ddd;}
+
+/*============Container and branding=============*/
+#container {
+	width: 750px;
+	text-align:left;
+	margin: 0 auto 12px auto;
+}
+#branding {
+	padding: 0;
+	height: 75px;
+	max-height: 75px;
+	background: url(images/header-background.gif) transparent;
+	background-repeat: no-repeat;
+	position: relative;
+}
+#projectlogo {
+	height: 75px;
+	width: 0;
+	padding: 5px;
+	float: left;
+}
+#grouplogo {
+	height: 75px;
+	width: 150px;
+	margin-left: 25px;
+	padding: 5px;
+	float: left;
+}
+#search {
+	padding: 8px;
+	float: right;
+	font-family: verdana, helvetica, sans;
+	font-size: 8pt;
+	font-weight: bold;
+	color: #ddddff;
+}
+#search input {
+	font-size: 8pt;
+	font-family: verdana, helvetica, sans;
+}*/
+#spacer {
+    clear:both;
+}
+#searchbox {
+	padding: 8px;
+	float: right;
+	font-family: verdana, helvetica, sans;
+	font-size: 8pt;
+	font-weight: bold;
+	color: #ddddff;
+}
+#searchbox input {
+	font-size: 8pt;
+	font-family: verdana, helvetica, sans;
+}
+#branding ul {
+	position: absolute;
+	/*display: block;*/
+	bottom: 0px;
+	right: 0;
+	margin: 0;
+	padding: 0px 15px 0px 0px;
+	list-style: none;
+}
+#branding li {
+	float: right;
+	background: transparent url("images/tr-on.gif") 100% 0% no-repeat;
+	padding: 0 6px 0 0;
+	margin: 0 1px 0 0;
+	border-bottom: 1px solid #515358;
+}
+#branding ul a {
+	float: left;
+	display: block;
+	padding: 4px 4px 4px 10px;
+	background: transparent url("images/tl-on.gif") no-repeat;
+	font-weight: bold;
+	color: #fff;
+	text-decoration: none;
+}
+#branding ul li:hover a {background: url("images/tl-off.gif") no-repeat;}
+#branding ul li:hover {background: url("images/tr-off.gif") 100% 0% no-repeat;}
+
+#branding ul li.current a {background: url("images/tl-off.gif") no-repeat;}
+#branding ul li.current {background: url("images/tr-off.gif") 100% 0% no-repeat;}
+
+#nav {
+	width: 23%;
+	display: block;
+	margin: 10px 0 0 0;
+	padding: 0;
+	background: #E0E9E9;
+	float: left;
+}
+#nav ul {
+	list-style: none;
+	margin: 0;
+	padding: 0;
+	font-size: 0px;
+}
+#nav ul li a {
+	display: block;
+	width: auto;
+	padding: 6px 10px 6px 10px;
+	background: #EDF2F2;
+	text-decoration: none;
+	font-size: 10pt;
+	font-family: verdana, helvetica, sans;
+	color: #000066;
+	margin: 0;
+	border-left: 1px solid #fff;
+	border-bottom: 1px solid #ddd;
+	border-top: 1px solid #fff;
+	border-right: 1px solid #ddd;
+}
+#nav ul .menupage {
+	display: block;
+	font-weight: bold;
+	width: auto;
+	padding: 6px 10px;
+	background: #D9E4E4;
+	text-decoration: none;
+	font-size: 10pt;
+	font-family: verdana, helvetica, sans;
+	color: #000066;
+	margin: 0;
+	border-left: 1px solid #fff;
+	border-bottom: 1px solid #ddd;
+	border-top: 1px solid #fff;
+	border-right: 1px solid #ddd;
+}
+#nav ul li .menupage {
+	display: block;
+	font-weight: bold;
+	width: auto;
+	padding: 4px 8px 4px 20px;
+	background: #C9D4D4;
+	text-decoration: none;
+	font-size: 8pt;
+	font-family: verdana, helvetica, sans;
+	color: #000066;
+	margin: 0;
+	border-left: 1px solid #fff;
+	border-bottom: 1px solid #ddd;
+	border-top: 1px solid #fff;
+	border-right: 1px solid #ddd;
+}
+#nav ul strong {
+	display: block;
+	width: auto;
+	padding: 6px 10px;
+	background: #E0E9E9;
+	text-decoration: none;
+	font-size: 10pt;
+	font-family: verdana, helvetica, sans;
+	color: #000066;
+	margin: 0;
+	border-left: 1px solid #fff;
+	border-bottom: 1px solid #ddd;
+	border-top: 1px solid #fff;
+	border-right: 1px solid #ddd;
+}
+#nav ul li li a {
+	padding: 4px 8px 4px 20px;
+	margin: 0;
+	font-size: 8pt;
+}
+#nav ul li a:hover {
+	background: #E0E9E9;
+}
+
+/*============Sub-tabs===========================*/
+#nav-main-sub {
+	text-align: right;
+	margin-right: 20px;
+}
+
+/*============Main content=======================*/
+#content {
+	clear: none;
+	margin-left: 25%;
+	padding: 10px;
+	font-family: verdana, helvetica, sans;
+	font-size: 10pt;
+	max-width: 75%;
+}
+#content-pdf {
+	float: right;
+	text-decoration: none;
+}
+#content-pdf a {
+	text-decoration: none;
+}
+#content h1 {
+	font-weight: bold;
+	font-size: 16pt;
+	letter-spacing: 2px;
+	padding: 0;
+	margin: 0;
+	display: block;
+	border-bottom: 2px solid #ddd;
+	color: #9AB;
+}
+#content h2 {
+	font-weight: bold;
+	font-size: 11pt;
+	letter-spacing: 1.5px;
+	padding: 0;
+	margin: 0;
+	display: block;
+	border-bottom: 2px solid #ddd;
+	color: #567;
+	font-family: "Trebuchet MS", helvetica, sans
+}
+#content h3 {
+	font-weight: bold;
+	font-size: 10pt;
+	letter-spacing: 1px;
+	padding: 0;
+	margin: 0;
+	display: block;
+	border-bottom: 2px solid #ddd;
+	color: #567;
+	font-family: verdana, helvetica, sans
+}
+
+#content a {
+	text-decoration:underline;
+	color: #567;
+}
+#content a:hover {
+	text-decoration:none;
+	color: #678;
+}
+
+/*============Labels, fixme etc.=================*/
+.frame {
+	border: solid black 1px;
+	margin: 1em 3em;
+}
+.frame .label {
+	background: #369;
+	color: white;
+	font-weight: bold;
+	padding: 5px 10px;
+}
+.frame .content {
+	padding: 5px 10px;
+	background: #F0F0FF;
+	color: black;
+	line-height: 170%;
+	font-size: 90%;
+}
+.warning .label {
+	background: #C00;
+	color: white;
+}
+.warning .content {
+	background: #FFF0F0;
+	color: black;
+}
+.fixme .label {
+	background: #C6C600;
+}
+
+/*============Footer=============================*/
+#siteinfo {
+	text-align: center;
+	clear: both;
+	padding: 5px;
+}
+#siteinfo p {
+	margin: 5px;
+}

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/default.css
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/new.css
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/new.css?view=auto&rev=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/new.css
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/new.css
Wed Apr 20 10:04:25 2005
@@ -0,0 +1,122 @@
+/*============HTML tags==========================*/
+body {
+
+}
+img {}
+hr {}
+
+/*============Container and branding=============*/
+#container {
+
+}
+#branding {
+
+}
+#projectlogo {
+
+}
+#search {
+
+}
+#search input {
+
+}
+#branding ul {
+
+}
+#branding li {
+
+}
+#branding ul a {
+
+}
+#branding ul li:hover a {}
+#branding ul li:hover {}
+
+#branding ul li.current a {}
+#branding ul li.current {}
+
+#nav {
+
+}
+#nav ul {
+
+}
+#nav ul li a {
+
+}
+#nav ul .menupage {
+
+}
+#nav ul li .menupage {
+
+}
+#nav ul strong {
+
+}
+#nav ul li li a {
+
+}
+#nav ul li a:hover {
+
+}
+
+/*============Sub-tabs===========================*/
+#nav-main-sub {
+
+}
+
+/*============Main content=======================*/
+#content {
+
+}
+#content-pdf {
+
+}
+#content-pdf a {
+
+}
+#content h1 {
+
+}
+#content h2 {
+
+}
+#content h3 {
+
+}
+
+#content a {
+
+}
+#content a:hover {
+
+}
+
+/*============Labels, fixme etc.=================*/
+.frame {
+
+}
+.frame .label {
+
+}
+.frame .content {
+
+}
+.warning .label {
+
+}
+.warning .content {
+
+}
+.fixme .label {
+
+}
+
+/*============Footer=============================*/
+#siteinfo {
+
+}
+#siteinfo p {
+
+}

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/new.css
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/profiling.css.xslt
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/profiling.css.xslt?view=auto&rev=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/profiling.css.xslt
(added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/profiling.css.xslt
Wed Apr 20 10:04:25 2005
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:import href="../../common/css/forrest.css.xslt"/>
+
+  <!-- This is not used by Forrest but makes it possible to debug the 
+       stylesheet in standalone editors -->
+  <xsl:output method = "text"  omit-xml-declaration="yes"  />
+  
+<!-- ==================== main block colors ============================ -->
+
+<xsl:template match="color[@name='header']">
+#branding {
+background-color: <xsl:value-of select="@value"/>;
+}  
+</xsl:template>
+
+<xsl:template match="color[@name='tab-selected']"> 
+#nav-main .current { background-color: <xsl:value-of select="@value"/>;} 
+#nav-main .current a:link {  color: <xsl:value-of select="@link"/>;  }
+#nav-main .current a:visited { color: <xsl:value-of select="@vlink"/>; }
+#nav-main .current a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template> 
+
+<xsl:template match="color[@name='tab-unselected']"> 
+#nav-main li      { background-color: <xsl:value-of select="@value"/> ;} 
+#nav-main li a:link {  color: <xsl:value-of select="@link"/>;  }
+#nav-main li a:visited { color: <xsl:value-of select="@vlink"/>; }
+#nav-main li a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template> 
+
+<xsl:template match="color[@name='subtab-selected']">
+#branding-tagline   { background-color: <xsl:value-of select="@value"/> ;} 
+#branding-tagline a:link {  color: <xsl:value-of select="@link"/>;  }
+#branding-tagline a:visited { color: <xsl:value-of select="@vlink"/>; }
+#branding-tagline a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template> 
+
+<!--xsl:template match="color[@name='subtab-unselected']">
+.level2tabstrip { background-color: <xsl:value-of select="@value"/>;}
+.datenote { background-color: <xsl:value-of select="@value"/>;} 
+.level2tabstrip.unselected a:link {  color: <xsl:value-of select="@link"/>;  }
+.level2tabstrip.unselected a:visited { color: <xsl:value-of select="@vlink"/>; }
+.level2tabstrip.unselected a:hover { color: <xsl:value-of select="@hlink"/>; }
+</xsl:template--> 
+<!--
+<xsl:template match="color[@name='heading']">
+.heading { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+-->
+<!--xsl:template match="color[@name='subheading']">
+.boxed { background-color: <xsl:value-of select="@value"/>;} 
+.underlined_5 	{border-bottom: solid 5px <xsl:value-of select="@value"/>;}
+.underlined_10 	{border-bottom: solid 10px <xsl:value-of select="@value"/>;}
+table caption { 
+	background-color: <xsl:value-of select="@value"/>; 
+	color: <xsl:value-of select="@font"/>;
+}
+</xsl:template> 
+<xsl:template match="color[@name='feedback']">    
+#feedback {
+	color: <xsl:value-of select="@font"/>;
+	background: <xsl:value-of select="@value"/>;
+	text-align: <xsl:value-of select="@align"/>;
+}
+#feedback #feedbackto {
+	color: <xsl:value-of select="@font"/>;
+}   
+</xsl:template>
+<xsl:template match="color[@name='published']">
+#published { 
+    color: <xsl:value-of select="@font"/>;
+    background: <xsl:value-of select="@value"/>; 
+}
+</xsl:template> 
+
+<xsl:template match="color[@name='navstrip']">
+#main .breadtrail {
+	background: <xsl:value-of select="@value"/>; 
+	color: <xsl:value-of select="@font"/>;
+}
+#main .breadtrail a:link {  color: <xsl:value-of select="@link"/>;  }
+#main .breadtrail a:visited { color: <xsl:value-of select="@vlink"/>; }
+#main .breadtrail a:hover { color: <xsl:value-of select="@hlink"/>; }
+#top .breadtrail {
+	background: <xsl:value-of select="@value"/>; 
+	color: <xsl:value-of select="@font"/>;
+}
+#top .breadtrail a:link {  color: <xsl:value-of select="@link"/>;  }
+#top .breadtrail a:visited { color: <xsl:value-of select="@vlink"/>; }
+#top .breadtrail a:hover { color: <xsl:value-of select="@hlink"/>; }
+
+</xsl:template> 
+
+<xsl:template match="color[@name='toolbox']">
+#menu .menupagetitle  { background-color: <xsl:value-of select="@value"/>}
+</xsl:template> 
+
+<xsl:template match="color[@name='border']">
+#menu           { border-color: <xsl:value-of select="@value"/>;}
+#menu .menupagetitle  { border-color: <xsl:value-of select="@value"/>;}
+#menu .menupageitemgroup  { border-color: <xsl:value-of select="@value"/>;}
+</xsl:template--> 
+
+<xsl:template match="color[@name='menu']">
+#nav-section {
+background-color: <xsl:value-of select="@value"/>;
+color: <xsl:value-of select="@font"/>;
+} 
+#nav-section a:link {  color: <xsl:value-of select="@link"/>;} 
+#nav-section a:visited {  color: <xsl:value-of select="@vlink"/>;} 
+#nav-section a:hover {
+background-color: <xsl:value-of select="@value"/>;
+color: <xsl:value-of select="@hlink"/>;
+} 
+#nav-section .menupagetitle  { color: <xsl:value-of select="@hlink"/>;}     
+</xsl:template> 
+<!--xsl:template match="color[@name='dialog']"> 
+#menu .menupageitemgroup     { 
+	background-color: <xsl:value-of select="@value"/>;
+}
+#menu .menupageitem {
+	color: <xsl:value-of select="@font"/>;
+} 
+</xsl:template--> 
+<xsl:template match="color[@name='menuheading']">
+.nav-section-title {
+    color: <xsl:value-of select="@font"/>;
+    background-color: <xsl:value-of select="@value"/>;
+}   
+</xsl:template> 
+<xsl:template match="color[@name='menuarea']">
+#nav-section .currentmenuitemgroup {
+    color: <xsl:value-of select="@font"/>;
+    background-color: <xsl:value-of select="@value"/>;
+}   
+</xsl:template> 
+<xsl:template match="color[@name='searchbox']"> 
+.search-input { 
+    background-color: <xsl:value-of select="@value"/> ;
+    color: <xsl:value-of select="@font"/>; 
+} 
+</xsl:template>
+
+<xsl:template match="color[@name='body']">
+body         { background-color: <xsl:value-of select="@value"/>;
+               color: <xsl:value-of select="@font"/>;} 
+a:link { color:<xsl:value-of select="@link"/>} 
+a:visited { color:<xsl:value-of select="@vlink"/>} 
+a:hover { color:<xsl:value-of select="@hlink"/>} 
+/*
+.menupage a:link { background-color: <xsl:value-of select="@value"/>;
+                                color:<xsl:value-of select="@link"/>} 
+.menupage a:visited { background-color: <xsl:value-of select="@value"/>;
+                                color:<xsl:value-of select="@vlink"/>} 
+.menupage a:hover { background-color: <xsl:value-of select="@value"/>;
+                                color:<xsl:value-of select="@hlink"/>} 
+*/
+</xsl:template>
+
+<xsl:template match="color[@name='footer']"> 
+#footer       { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+
+
+<!-- ==================== other colors ============================ -->
+<!--xsl:template match="color[@name='highlight']"> 
+.highlight        { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+
+<xsl:template match="color[@name='fixme']"> 
+.fixme        { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+
+<xsl:template match="color[@name='note']"> 
+.note         { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+
+<xsl:template match="color[@name='warning']"> 
+.warning         { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template>
+
+<xsl:template match="color[@name='code']"> 
+.code         { border-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+
+<xsl:template match="color[@name='table']"> 
+.ForrestTable      { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template> 
+
+<xsl:template match="color[@name='table-cell']"> 
+.ForrestTable td   { background-color: <xsl:value-of select="@value"/>;} 
+</xsl:template--> 
+
+
+</xsl:stylesheet>

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/resources/skin/css/profiling.css.xslt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/src/documentation/content/xdocs/index.xml?view=diff&r1=162021&r2=162022
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/src/documentation/content/xdocs/index.xml
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.viewHelper/src/documentation/content/xdocs/index.xml
Wed Apr 20 10:04:25 2005
@@ -23,21 +23,49 @@
   </header> 
   <body> 
 <section>
-  <title>ViewHelper </title>
-<p>Each forrest:contract of a forrest:view will dispatch a xml file (ViewHelper) that
contains
-xsl:stylesheets for the different output formats, a contract can
-implement. For html, the only format that we have implemented so far, we
-have three different kind of templates:</p><p>
-<![CDATA[<xsl:templates name="{contract/@name}-css/>]]><br/>
-Here the contract specific css will be stored.
-</p><p>
-<![CDATA[<xsl:templates name="{contract/@name}-head/>]]><br/>
-Here goes everything that belongs in the html head. e.g. scripts.
-</p><p>
-<![CDATA[<xsl:templates name="{contract/@name}-body/>]]><br/>
-Everything that belongs into the body.
-  </p>
-  <p>You can find sample implementations in {this.plugins.path}/resources/templates/.</p>
+  <title>How to create your own implementation </title>
+	<p>Diwaker Gupta wrote: "Of course, we can have a good debate on whats the best way
to
+generate XHTML content for the tabs to make it "most amenable" to CSS
+skinning. Personally, I would just output each tab in its own div
+element, with class attributes denoting the selected tab. One can then
+use CSS to structure/color them appropriately."</p>
+<note>All following explanations/steps assume you use the default
+configuration of forrest.</note>
+	<p>Ok, you may want to try another feature that is coming with
+forrest:views.</p>
+<section>
+	<title>Create your own contract implementation</title>
+		<ol>
+		<li>Create in src/documentation the folder resources/templates. ...or
+more generally speaking create ${project.resources-dir}/templates.</li>
+		<li>Copy
+{this.plugins.path}/resources/templates/nav-main.ft to this folder.
+</li>
+		<li>Add after the <![CDATA[<xsl:template name="nav-main-body"/>]]> something
like 
+</li>
+		<source><![CDATA[<xsl:template match="ul[@id='nav-main']">
+<div id="nav-main">
+  <xsl:apply-templates select="li"/>
+</div>
+</xsl:template>
+<xsl:template match="li[not(@class)]">
+<div class="base-not-selected">
+  <xsl:apply-templates/>
+</div>
+</xsl:template>
+<xsl:template match="li[@class='current']">
+<div class="current">
+  <xsl:apply-templates/>
+</div>
+</xsl:template>]]></source>
+<li>Change the css in <![CDATA[<xsl:template name="nav-main-css">]]>. I
tried but
+the result is not nice. If you succeed please change the name of the
+contract to "nav-main-div", add the patch to the issue-tracker and I add
+the new contract to the viewHelper plugin. ;-)</li>
+	</ol>
+</section>
+	
+  <p>You can find more implementations in {this.plugins.path}/resources/templates/.</p>
   </section>
   </body>
 </document>



Mime
View raw message