From svn-return-3151-apmail-forrest-svn-archive=forrest.apache.org@forrest.apache.org Sun Jul 17 09:26:19 2005
Return-Path:
@@ -340,7 +340,7 @@
- By working on the i18n integration for "pelt" we crossed again the whys for using views. ;-)
- The maintainment problem was to change the captions of the skin features (contracts) to enable
+ 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 site2xhtml.xsl has a lot of repeating code.
For example the "last-publish"-contract could be found 2 times in the code.
- This is not the only contract that was (is) double in the code. The problem with that is that
- we needed to search the code for each caption and senseless repeat the following
- maintainment step of adding the <i18n:text/>-tags.
+ 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 <i18n:text/>-tags.
Now we can enhance the maintainment for the future and we give this code snippets
+
+ 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:
@@ -395,7 +395,7 @@
</xsl:template>
- This allows us in a next maintainment just change the code of
+ This allows us in a next maintenance to just change the code of
<xsl:template name="siteinfo-last-published"/> and apply it in any position where
it is placed.
@@ -351,19 +351,19 @@
@@ -374,9 +374,9 @@
+ Published:</i18n:text> " + document.lastModified);
-
-Enhance the maintainment
-Enhance the maintenance
+
@@ -468,19 +470,19 @@ <forrest:template name="blank" body="false" head="false"> That leads to the template attribute @body="true" and @head="false". In xhtml a contract can add content to the <body/> or/and - <head/> part of <html/>. This values have to be change when adding an actual template. - Besides this a xsl-template has to indicate this in the naming. A template that add content to the - html body has to end with "-body"!!! + <head/> part of <html/>. 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 "-body"!!!
- A <forrest:template /> has the son <xsl:stylesheet/> where we can create + A <forrest:template /> has the child <xsl:stylesheet/> 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:
@@ -497,15 +499,15 @@- Now lets pick up the example we started with and create a "siteinfo-last-published-howto" contract. + Now let us pick up the example we started with and create a "siteinfo-last-published-howto" contract. Save the blank.ft to {project.home}/src/documentation/resources/templates/siteinfo-last-published-howto.ft.
- Now the maintainment optimized code (xpath="/html/body/*") was: + Now the maintenance-optimized code (xpath="/html/body/*") was:
<xsl:template name="siteinfo-last-published">
@@ -542,7 +544,7 @@
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=219381&r1=219380&r2=219381&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=219381&r1=219380&r2=219381&view=diff ============================================================================== --- forrest/site/docs_0_80/howto/howto-view-dsl.html (original) +++ forrest/site/docs_0_80/howto/howto-view-dsl.html Sun Jul 17 02:26:13 2005 @@ -261,7 +261,7 @@
- This how-to will show you how to write a forrest:view from ground on. - We will focus on html as output format. As well it will show how to add your own css implementation to the view. + This how-to will show you how to write a forrest:view 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.
- We developed forrest:view to let the user decide where to place elements in e.g. html-pages. + We developed forrest:view to let the user decide where to place elements in e.g. html pages. We started this work with the skinconf.xml where you could configure certain elements and - their positions. This elements was known under certain names. It was up to the skin-designer to support + their positions. These elements were known under certain names. It was up to the skin designer to support this configuration and the elements.
The work started with grouping elements (the ones from skinconf). We used css-contracts that we added as @attributes e.g. <div id="content-main"/> . That made it possible to use the same elements in different skins. For the full list refer to the - - inicial contract list + + initial contract list
- Around this contracts we developed a configuration Domain Specific Language and called it forrest:view . - forrest:view 's allows us to define the order in which forrest:contract's appear, and also to group - them using forrest:hook's. + Around this contracts we developed a configuration Domain Specific Language and called itforrest:view. + These forrest:views allows us to define the order in which forrest:contracts appear, and also to group + them using forrest:hooks.
-forrest:hook's are container that are only used for layout reasons. They do not add - any content nor functionality to the output. They add only layout information to +forrest:hooks are containers that are only used for layout reasons. They do not add + any content or functionality to the output. They add only layout information to the output. Actually a <forrest:hook name="layoutId"/> will be transformed to <div id="layoutId"/>
-forrest:contract's are functionality or extra content that a skin can use to display the requested +forrest:contracts are functionality or extra content that a skin can use to display the requested document (content-main). Sometimes a contract delivers format-specific markup, other times it delivers a format-independent string.
<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" > - <forrest:view type="xhtml"> - </forrest:view> +<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"> + <forrest:view type="xhtml"> + </forrest:view> </forrest:views>@@ -401,7 +401,7 @@ The only format we implemented is xhtml for now. This is as well true for the delivered contracts.
- Now lets start to skin our site. :) + Now let us start to skin our site.
Creating your first view
@@ -417,29 +417,29 @@Let use the blank view from the earlier step and add the content-main contract. In - ls.contracts.html we find the information how to use the contract in our view. Our + ls.contracts.html we find the information for how to use the contract in our view. Our index.fv should look like:
-<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" > - <forrest:view type="xhtml"> +<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"> + <forrest:view type="xhtml"> <forrest:contract name="content-main"/> - </forrest:view> + </forrest:view> </forrest:views>- Let's try our new view by pointing to http://localhost:8888/index.html. - We will see only the main content. :) Now let's add the section navigation to our view. + Lets try our new view by pointing to http://localhost:8888/index.html. + 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:
-<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" > - <forrest:view type="xhtml"> +<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"> + <forrest:view type="xhtml"> <forrest:contract name="content-main"/> <forrest:contract name="nav-section"/> - </forrest:view> + </forrest:view> </forrest:views>- We find now the main content and the section navigation after each other and in the order + 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).
@@ -448,7 +448,7 @@We will use now the first time a <forrest:hook name="layoutId"/>. 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. + 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
/* menu */ @@ -464,7 +464,7 @@ and add contracts into that container.- If we want to put the nav-section contract into the left side position + 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:
<forrest:hook name="leftbar"> @@ -486,7 +486,7 @@CSS in views
- We know now how to place contracts and hooks in our view, till this stage we only used the default.css. + 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 <forrest:css url="default.css"/>.
@@ -512,9 +512,10 @@Note-<forrest:css url="howTo.css"/> has to be direct son of - <forrest:view type="xhtml">!!! -+<forrest:css url="howTo.css"/> needs to be the direct child of + <forrest:view type="xhtml"> + +<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" > <forrest:view type="xhtml"> @@ -527,8 +528,8 @@ </forrest:views>- Now you see a white page where the menu is sourrounded by a solid border with the defined background. - As second example let us change as well the content-main by adding another hook + 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 <forrest:hook name="content"/> We need to add the new layout container to our howTo.css:
@@ -541,7 +542,8 @@ }- Then we have to add the 'content-main' contract to the 'content' hook, the resulting view looks like: + Then we have to add the 'content-main' contract to the 'content' hook. + The resulting view looks like:
<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" > <forrest:view type="xhtml"> @@ -556,7 +558,7 @@ </forrest:views>- We are now able to place contracts into layout container and add custom css to the view. + We are now able to place contracts into the layout container and add custom css to the view.
- +Fixme (thorsten)@@ -571,7 +573,7 @@Congratulations you are now able to work with the view DSL. - From here we recommend to read the following How-To's: + From here we recommend to read the following How-Tos:
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=219381&r1=219380&r2=219381&view=diff ============================================================================== Binary files - no diff available. Modified: forrest/site/docs_0_80/howto/howto-view-install.html URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_80/howto/howto-view-install.html?rev=219381&r1=219380&r2=219381&view=diff ============================================================================== --- forrest/site/docs_0_80/howto/howto-view-install.html (original) +++ forrest/site/docs_0_80/howto/howto-view-install.html Sun Jul 17 02:26:13 2005 @@ -312,7 +312,7 @@
"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 proof-reading. +This HowTo is a good start but still needs more work.@@ -333,17 +333,20 @@
- You have to use the trunk version of forrest for using views because it is in an early stage
+ +- Read How to Build a Plugin + especially the section about using Forrest's own Ant.
Steps
The process of setting up the plugin is quite heavy. We promise it will be easier in the future. Some of the instructions has to be modified with your local settings.
- +Build the view and the viewHelper plugins
The first step is to build the view and the viewHelper plugins. Change to a console of your choice @@ -358,57 +361,57 @@ cd ../org.apache.forrest.plugin.output.viewHelper.xhtml/ ant local-deploy - +
Seed a new project
- Go to the dir where you want to seed a new project and seed it. + Go to the directory where you want to seed a new project and seed it.
cd ~/src/newSeed forrest seed- +Modifying forrest.properties
- Now we have to tell forrest that we are planing to use the view plugins. We will do that - by editing to the forrest.properties to add the plugins: + Now we have to tell forrest that we are planning to use the view plugins. We will do that + by editing the forrest.properties to add the plugins:
project.required.plugins=org.apache.forrest.plugin.output.viewHelper.xhtml,org.apache.forrest.plugin.internal.viewNow we have to change the project skin to leather-dev. The reason is that the plugins are still - not independend form the "old fashion skins". + not independent from the "old fashion skins".
- +Note-We exchanging only - site2xhtml.xsl of leather-dev skin by the plugins and some contracts are based +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.project.skin=leather-dev- +Test your new view based project
- Now you have finished the preparation and the setup to finally try + Now you have finished the preparation and the setup to finally do
forrest runthen point to http://localhost:8888/ and you should see the default - view based skin.
+ view-based skin.- +Note-When developing styles with views 'forrest run' is the quickest -way. You will see you do not have to build your project to see the +- +When developing styles with views, 'forrest run' is the quickest +way. You will see that you do not have to build your project to see the changes on your pages when working with *.fv.Available contracts
- To start working with views you need to know which contracts you can use. + To start working with views, you need to know which contracts you can use. For this we will install another plugin org.apache.forrest.plugin.input.viewHelper.xhtml.ls. The setup is:
@@ -419,10 +422,10 @@ ant local-deploy- The newly installed plugin will show the available contracts as html page. - First we have to tell forrest that we are planing to use the new plugin. We will do that + 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 newSeed - to add the plugin: + to add the plugin:
project.required.plugins=org.apache.forrest.plugin.input.viewHelper.xhtml.ls @@ -432,7 +435,7 @@ On this page you will find all contracts that you can use in your project.Further Reading
- +@@ -451,7 +454,7 @@
Feedback
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=219381&r1=219380&r2=219381&view=diff ============================================================================== Binary files - no diff available. Modified: forrest/site/tools/forrestbot.html URL: http://svn.apache.org/viewcvs/forrest/site/tools/forrestbot.html?rev=219381&r1=219380&r2=219381&view=diff ============================================================================== --- forrest/site/tools/forrestbot.html (original) +++ forrest/site/tools/forrestbot.html Sun Jul 17 02:26:13 2005 @@ -151,6 +151,9 @@ deploy.svn
+deploy.ftp + +notify @@ -334,6 +337,10 @@ deploy.svn + ++deploy.ftp + @@ -374,7 +381,7 @@ default?Workstage Properties
Each workstage implementation is configurable with properties. The following tables describe each property and whether or not you are @@ -386,7 +393,7 @@ my-settings.xml) that just sets those properties (don't include it in CVS/SVN). Then in your project buildfile, have <import file="my-settings.xml"/>.
- +Misc Properties
@@ -417,13 +424,13 @@
- +getsrc.clean-workdir
This should be executed before a getsrc implementation is executed. For example, <target name="getsrc" depends="getsrc.clean-workdir, getsrc.svn"/>
- +getsrc.local
@@ -455,7 +462,7 @@
- +getsrc.cvs
@@ -551,7 +558,7 @@
- +getsrc.svn
@@ -595,7 +602,7 @@
- +build.forrest
@@ -638,7 +645,7 @@
- +deploy.local
@@ -670,7 +677,7 @@
- +deploy.scp
${user.home}/.ssh/known_hosts must properly recognize the host, so you should manually make an ssh connection to the host if you never @@ -717,7 +724,7 @@ - +
deploy.cvs
This is only available on *nix operating systems.
@@ -814,7 +821,7 @@
- +deploy.svn
@@ -884,7 +891,77 @@
- + +deploy.ftp
++ +
++ + + + +Property + +Description + +Default Value + +Required? + ++ + + + +deploy.ftp.server + +FTP server to upload files to + +localhost + +No + ++ + + + +deploy.ftp.user + +FTP username to use for authenticating with the server + +anonymous + +No + ++ + + + +deploy.ftp.password + +Password for the FTP user + +forrestbot@ + +No + ++ + + +deploy.ftp.remotedir + +The directory to upload to (this can be an absolute path or + relative to the FTP user's default directory) + +incoming + +No + +notify
These settings are used by all notify implementations.
@@ -982,10 +1059,10 @@
- +notify.local
No properties.
- +notify.email