forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Podunavac>
Subject joinin LENYA and FORREST
Date Thu, 11 Aug 2005 11:31:45 GMT
Hi devs,

I am David, some of you might remember me from the ApacheCon this year,
anyway I heard the need of joinin LENYA and FORREST and the discussion
monday late night.
As Ross encouraged me to post or to help you out, with the stuff I know
about LENYA. So here it is the things that came to my mind on how stuff
works or the things i know about to let you know, in order to make this
MARRIAGE possible.
I hope this will help:
the entry point for lenya is the sitemap.xmap @LENYA_HOME/build/lenya/webapp

-this sitemap defines all the components used, can be compared to the
root sitemap in forrest as far as i can see
-then the authorizer action is being called which mounts the
-the global-sitemap handles all the modules i call it modules i dont
know if it is the right name
 but what i mean with modules is e.g. the built-in wysiwyg editors, the
search engine, usecases, the i18n stuff the admin-area etc
 for all this modules an extra sitemap is mounted
 the same with the actual publication as lenya has different
publications (<-- is this the same as your forrest seeds?)
 and different areas: areas is the level of published documents e.g if a
document is created it is in the authoring area
 when the editor is done writing the doc he submits it and the reviewer
has to publish it
 so this document is copied from the authoring area to live and the
visitor can finally view the page
 so if your uri looks like this
 so the sitemap.xmap @LENYA_HOME/build/webapp/lenya/pubs/{PUBLICATION}
is called
 which mounts the publication-sitemap.xmap in the same directory 
 this publication-sitemap.xmap mounts the doctypes.xmap and handles the
document aggregation
 like navigational elements (breadcrumb, tabs, menus) with the actual
content of the document
 after this aggregation it calls the transformation for the doctype
 this is when the authorizer checks if the requested url is only for
certain users
 i am skippin the long description how lenya might work on this
 loading the global-sitemap.xmap @LENYA_HOME/build/webapp
 the global-sitemap.xmap is used only internal
 here are some tries or ideas on how lenya and forrest could/should work

 this MARRIAGE(joining lenya and forrest) what i call it now could be
done on the publication-sitemap.xmap level
 when we look at the sitemaps of lenya and forrest we will see that they
look alike
 take a look at the publication-sitemap.xmap
 of a clean lenya lines 120ff.
 <!-- This is the pipeline that builds the page. It aggregates all
    the navigational elements (breadcrumb, tabs, menu) with the actual
    content of the document. -->
/lenyabody-{rendertype}/{publication-id}/{area}/{doctype}/{url} -->
      <map:match pattern="lenyabody-*/*/*/*/**">
        <map:aggregate element="cmsbody">
          <map:part src="cocoon://navigation/{2}/{3}/breadcrumb/{5}.xml"/>
          <map:part src="cocoon://navigation/{2}/{3}/tabs/{5}.xml"/>
          <map:part src="cocoon://navigation/{2}/{3}/menu/{5}.xml"/>
          <map:part src="cocoon://navigation/{2}/{3}/search/{5}.xml"/>
        <map:transform src="xslt/page2xhtml-{4}.xsl">
          <map:parameter name="root"
          <map:parameter name="url" value="{5}"/>
          <map:parameter name="document-id"
          <map:parameter name="document-type"
          <map:parameter name="language"
        <map:transform type="i18n">     
          <map:parameter name="locale"
        <map:select type="parameter">
          <map:parameter name="parameter-selector-test" value="{1}"/>
          <map:when test="view">
          <map:transform type="link-rewrite"/>
        <map:serialize type="xml"/>
    and compare this to forrest sitemap.xmap @forrest/main/sitemap
    <map:pipeline internal-only="false">
<!--pipeline that "marries" the docs in the root dir with the skin to
produce html-->
      <map:match pattern="*.html">
        <map:aggregate element="site">
          <map:part src="cocoon:/skinconf.xml"/>
          <map:part src="cocoon:/build-info"/>
          <map:part src="cocoon:/tab-{0}"/>
          <map:part src="cocoon:/menu-{0}"/>
          <map:part src="cocoon:/body-{0}"/>
        <map:call resource="skinit">
          <map:parameter name="type" value="site2xhtml"/>
          <map:parameter name="path" value="{0}"/>
<!--pipeline that "marries" the docs in all other dirs then root with
the skin to produce html-->
      <map:match pattern="**/*.html">
        <map:aggregate element="site">
          <map:part src="cocoon:/skinconf.xml"/>
          <map:part src="cocoon:/build-info"/>
          <map:part src="cocoon:/{1}/tab-{2}.html"/>
          <map:part src="cocoon:/{1}/menu-{2}.html"/>
          <map:part src="cocoon:/{1}/body-{2}.html"/>
        <map:call resource="skinit">
          <map:parameter name="type" value="site2xhtml"/>
          <map:parameter name="path" value="{0}"/>
      our plan is to integrate forrest into lenya (hope that is okay
with you forrest guys :) )
      to do so marcin mentioned that:
      lenya should do the matching on the first level than
      forrest should receive the content like (menus, tabs, body) from lenya
      and transform this content into forrest conform content (so this
content could be used in forrest)
      after this step lenya lets forrest do the all the styling
      so here is the pseudo pipeline as far as we understood forrest and
      <!-- this is the pipeline that should transform the content
delivered by lenya into forrest -->
      <map:match pattern="body-*-*-*.html">
        <map:transform type="TRANSFORM_LENYA2FORREST"/> <!-- need to be
implemented -->
       <!-- here is when forrest takes over -->
        <map:transform type="idgen"/>
        <map:transform type="xinclude"/>
        <map:transform type="linkrewriter"
src="cocoon:/{1}linkmap-{2}.html"/> <!-- this parametes is not correct,
but is as i said just an idea on how it could/should work -->
src="resources/stylesheets/declare-broken-site-links.xsl" />
        <map:call resource="skinit">
          <map:parameter name="type" value="document2html"/>
          <map:parameter name="path" value="{1}{2}.html"/>
          <map:parameter name="notoc" value="false"/>
     <!-- this is the entry point and is a mixture of a forrest and
lenya -->
<!-- this is lenya stuff -->     
/lenyabody-{rendertype}/{publication-id}/{area}/{doctype}/{url} -->
      <map:match pattern="lenyabody-*/*/*/*/**">
<!-- and from here on this is forrest stuff -->       
        <map:aggregate element="site">
          <map:part src="cocoon:/skinconf.xml"/>
          <map:part src="cocoon:/build-info"/>
          <map:part src="cocoon:/body-{1}-{3}-{4}"/>
        <map:call resource="skinit">
          <map:parameter name="type" value="site2xhtml"/>
          <map:parameter name="path" value="{0}"/>
        <map:serialize type="xml"/>

    sure there are alot of things to do in order to make this run
    like adjusting pipelines, parameters etc etc
    but we want to help you guys on that but we NEED YOUR HELP and FEEDBACK
      please let me know if this thinking makes sense or if there are
things we did not understood or thought about right
      if you guys agree with this approach or have any hints or problems
which we haven't thought about let us know
      or things you want us to do
      feel free
      we definitely want to help and wait for some any feedback if this
all makes sense
      marcin and david

Hope that helps somehow : )

View raw message