forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: [RT] future of v2
Date Wed, 16 Nov 2005 11:39:35 GMT
El jue, 10-11-2005 a las 16:36 +0100, Thorsten Scherler escribió:
> Hi all,
> I am working on some java classes that should become the dispatcher
> core. While doing it I thought about the usage of contracts. We are now
> doing a parallel processing which has influence on the performance. 
> Introducing jx:import reduced a wee bit the build time and the recent
> update of the lm a lot more. Still it is too slow. Doing some process
> consulting on v2 we pointed out that the xsl magic is slowing as well
> things down. The idea has to be to slim down the processing. 
> IMO contracts have to work standalone. Meaning that the dispatcher will
> call the contract with the given properties and include the *result* and
> not raw-data and xsl. 

I have a basic doing the above written. It is a bean
containing besides other:
private Document contractImpl;
private Document contractRawData;
private Element contractTransformer;

I need to write a cocoon-transfomer that is doing the following when
encounter a contract:
a) create new contract bean with a contract structurer element coming
from e.g. index.fv
b) load contract bean with 
 I. the contract implementation (e.g. nav-main.ft)
 II. the raw data if it is a nugget contract
 III. the transfomer (e.g. the xsl:stylesheet from the nav-main.ft)
c) transform the contract data (raw data, if nugget and/or properties)
with the transfomer (III.)
d) add transformed contract to the contentHandler. 

My current testing code ignores ATM forrest:properties because I thought
about them a wee bit and since contracts are now standalone we could:
a) keep it like it is - passing the properties as xsl:param to the
stylesheet like 
transformer.setParameter("someProperty", somePropertyElement);)

b) include them into the raw data document like:

In both ways contracts should change. Here my current testing version:
<forrest:contract name="nav-main-testing" type="nugget"
    nav-main will output the main or primary navigation AKA tabs.
  <usage><![CDATA[<forrest:contract name="nav-main-testing"
  format="html" name="nav-main-testing" inputFormat="xsl" >

    <xsl:stylesheet version="1.1" 
<!--Should we prefer b)? -->
      <xsl:param name="nav-main-testing" select="/"/>
<!-- We are now matching root because contracts are standalone -->
      <xsl:template match="/" >
            <div id="tabs">
              <xsl:comment>+ |start Tabs new +</xsl:comment>

              <xsl:comment>+ |end Tabs +</xsl:comment>

I have shorten the definition of nugget-contracts in the structurer:
<forrest:contract name="nav-main-testing"

> Now my idea is that a structurer will
> a) resolved via lm
> b) transformed with jx
> c) dispatch and include transformed contracts

I still need to write the transfomer, right now I am testing with a
generator but that should/will become a transfomer.

> d) transform hooks into format specific markup
> e) transform all above to the final page
> The question is how can we make contracts more generic. One way is to
> get rid of head|body="true|false". I thought that each contract has to
> provide this information from the resulting transformation.

Above contract solved the issue.

> Then the last transformation e) would only have to clean the html/* stuff.

This I will implement as soon the transfomer is ready.



"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message