cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: [RT] Virtual Sitemap Components
Date Sat, 17 Jul 2004 18:46:04 GMT
I'll try to summarize what we've got so far (as far as I interpret this
thread :) ):

A VPC (virtual pipeline component) is like a macro (I didn't find a better
it can contain matchers, selectors and actions.
A Virtual Generator must have a generator (and perhaps some transformers in
it), but no
A Virtual Transformer should have one or more transformers (but no generator
or serializer)
a Virtual Serializer can have one or more transformers and has to end with a

I like Stefano's apprach for labels:

>here is my suggestion: a vpc is just syntax sugar, it should not change 
>the semantics. this means that internal labels should be treated as just 
>if they were external.
>the only issue is with collisions and here I think overloading should 
>apply: if the label is on the vpc and the vpc itself includes a 
>component that has the same label, the output of the whole vpc will be 
>sent to the view.

For parameter handling, I can quote Sylvain:
> Passing parameters to a VSC is very similar to passing parameters 
> to resources. There's however a special handling of the @src attribute
> that exists on generators and transformers, which does not exist on
>Definition (syntax and exact location still has to be defined):
><map:virtual-generator type="foo">
> <map:generate src="{src}"/>
>  <map:act type="lang-select">
>    <map:transform type="i18n"/>
>  </map:act>
>  <map:transform type="xslt" src="stylesheets/{bar}.xsl/>
><map:generate type="foo" src="blah">
>  <map:parameter name="bar" value="baz"/> </map:generate>

Apart from the syntax (which we could define last), I see only two open
a) are VPCs inherited to sub sitemaps
I guess, we all say: "Sure"

b) (my favorite topic) Source Resolving
As long as the VPC is defined in the same sitemap as it is used, we don't
have a
problem, but if we answer question a) with yes, then we have a problem.
Look at the sample from Sylvain above, now imagine the Usage is in a
So the src ("blah") should refer to a source that is relative to the sitemap
of the Usage. 
The VPC from above resolves two sources (the src and the stylesheet).
The stylesheet should imho be resolved relative to the sitemap where
the VPC is defined.

Now, a first approach would be: all resources of VPC are resolved relative
to the sitemap where the VPC is defined. And if a src information is passed
(for virtural generators or transformers) this src information is
resolved relative to the usage sitemap and then passed as an absolut
path to the VPC.

This works nicely as long as only the "src" attribute defines a resource
but not a paramaeter.


Carsten Ziegeler 
Open Source Group, S&N AG

View raw message