cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@dff.st>
Subject Re: TraxTransformer and LogicsheetCodeGenerator vs. sitemap parameter
Date Wed, 16 May 2001 08:56:49 GMT
> > Ok, I just looked into the source code and found the
> > reason why sitemap parameters can not be passed to logicsheets
> > like this:
> >
> >   <map:generate type="serverpages" src="..">
> >     <parameter name="to_logic_sheet" value="{1}"/>
> >   </map:generate>
> >
> > I found out that the LogicsheetCodeGenerator gets a direct TransformerHandle
> > and does not use the TraxTransformer. Is there a specific reason why the
> > TraxTransformer isn't used instead? The TraxTransformer has all the needed
> > methods to pass parameters from the sitemap to the logicsheet.
> > All what needs to be done is to pass the parameters from the
> > ServerPagesGenerator to the LogicsheetCodeGenerator and then to the
> > TraxTransformer that creates the ServerPage.
> >
> > Does this make sense? I still cannot see the big picture of the cocoon
> > architecture but in terms of straighten out everything this sounds
> > reasonable to me...
> >
> > Comments?
>
> I think you are mixing the 2 steps that are involved in XSP invocation :

I don't think so ;)

> - code generation and compilation : this is where logicsheets are
> involved to generate code. This code should not depend on request
> parameters, otherwhise XSPs will have to be regenerated and recompiled
> for each request, which would be non-sense.

Well, of course not on _request_ parameters but _sitemap_ parameters!
You can use them in the src attribute of a generator - so why not
in your logicsheets? It's the same time... of course you can construct
something stupid with this mechanism but look at this example -
there is no problem of recompilation at request time:

<map:generate type="serverpages" src="xml/{1}">
  <parameter name="to_logic_sheet" value="{1}"/>
</map:generate>

I think there is just one rule: if you pass a substituted sitemap
parameter the substitution must appear in the src attribute as well.
This will make the generated code distinct by the parameter.

I just think it is stupid to parse the URI in the serverpage
on every request if you already have everything at your finger
tips at compile time.
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message