Author: thorsten Date: Sun Mar 27 12:54:49 2005 New Revision: 159191 URL: http://svn.apache.org/viewcvs?view=rev&rev=159191 Log: extracted the menu and innermenuli to the nav contract implementation from the prepare.xhtml.xsl. This fixed as well the linking. :) I added as well some docu. Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/prepare.xhtml.xsl forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/templates/nav.ft forrest/trunk/plugins/org.apache.forrest.plugin.views/src/documentation/content/xdocs/index.xml forrest/trunk/plugins/org.apache.forrest.plugin.views/status.xml Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap?view=diff&r1=159190&r2=159191 ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.views/output.xmap Sun Mar 27 12:54:49 2005 @@ -128,7 +128,7 @@ + list the project fbits--> @@ -153,7 +153,7 @@ Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/prepare.xhtml.xsl URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/prepare.xhtml.xsl?view=diff&r1=159190&r2=159191 ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/prepare.xhtml.xsl (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/stylesheets/prepare.xhtml.xsl Sun Mar 27 12:54:49 2005 @@ -35,31 +35,11 @@ - - - + + All xhtml head elements requested by the forrest:template @@ -124,77 +104,7 @@ - -+ - |start Menu - + - - - - - - - - - - - - - - currentmenuitemgroup - menuitemgroup - - - - -
  • -
      - - - - -
    • -
      - - - - - - - - - - -
      - -
      -
  • -
    + Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/templates/nav.ft URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/templates/nav.ft?view=diff&r1=159190&r2=159191 ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/templates/nav.ft (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.views/resources/templates/nav.ft Sun Mar 27 12:54:49 2005 @@ -123,6 +123,76 @@ |end menu + + ++ + |start Menu + + + + + + + + + + + + + + + + currentmenuitemgroup + menuitemgroup + + + +
  • +
      + + + + +
    • +
      + + + + + + + + + + +
      + +
      +
  • +
    Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/src/documentation/content/xdocs/index.xml URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/src/documentation/content/xdocs/index.xml?view=diff&r1=159190&r2=159191 ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.views/src/documentation/content/xdocs/index.xml (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.views/src/documentation/content/xdocs/index.xml Sun Mar 27 12:54:49 2005 @@ -23,7 +23,172 @@
    Apache Forrest - org.apache.forrest.plugin.views Plugin -

    This plugin ...

    + +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) + +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. +
    Modified: forrest/trunk/plugins/org.apache.forrest.plugin.views/status.xml URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.views/status.xml?view=diff&r1=159190&r2=159191 ============================================================================== --- forrest/trunk/plugins/org.apache.forrest.plugin.views/status.xml (original) +++ forrest/trunk/plugins/org.apache.forrest.plugin.views/status.xml Sun Mar 27 12:54:49 2005 @@ -19,6 +19,7 @@ +