You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@verizon.net> on 2002/01/14 04:26:49 UTC
Views and RE: [VOTE] Retuning Sitemap Implementation
Most of the changes are done. PLEASE: test with your setup/sitemap, add
more test cases to the lint/sitemap.xmap.
> From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
>
> Vadim Gritsenko wrote:
> >
> > > Summary of the proposed changes:
> > >
> > > 1. A pipeline may contain *all* components at the first level.
>
> +5
Done, as far as I can test it - working all right.
> > > 2. Pipelines are to be validated against following rules:
> > > (1) all pipelines must have generator or
> > > reader|mount|redirect|call.
> > > (exclusion: handle-errors already have a generator)
>
> +1
Done, add aggregator to the list.
> > > (2) pipelines with generator|transformer must have serializer
> > > (exclusion: handle-errors always must have serializer)
>
> +1
Done, also add aggregator to the list.
> > > (3) readers|serializers|mount|call|redirect must never have
other
> > > sitemap components after them.
>
> +1
Done.
> > > (4) matchers and selectors without nested direct components are
> > > illegal
> > >
>
> -0, this is again a restriction which I think is not necessary
Commented out.
> > > 3. Token expansion is allowed for all attributes.
> > >
>
> +5
Done; yet there is an issue with the views, labels, and
map:generate|serialize|transform's type attribute. The issue is how to
determine label of the particular component if at compilation time name
of the component is not known (because of substitution).
Thinking about views, why it is necessary to declare views and
component's labels in every sub-sitemap? If first is just inconvenience,
second poses more serious treat: every sub sitemap dealing with views
must define own pool of components (read: use (sometimes: lots of)
memory), leading to scalability issues. I think there is need to come up
with the mechanism to lookup view labels on run-time. Any ideas?
And I have another view-related question: what should be the correct
view behavior for the following sitemap fragment:
<map:generators default="file">
<map:generator type="file" src="..." label="content"/>
<map:generators>
...
<map:generate src="data"/>
<map:transform src="data2page" label="content"/>
<map:serialize/>
Now it seems invokes view right after generator.
Would like to hear comments/opinions/etc,
Regards,
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Views and RE: [VOTE] Retuning Sitemap Implementation
Posted by Stefano Mazzocchi <st...@apache.org>.
Sylvain Wallez wrote:
> > Done; yet there is an issue with the views, labels, and
> > map:generate|serialize|transform's type attribute. The issue is how to
> > determine label of the particular component if at compilation time name
> > of the component is not known (because of substitution).
>
> Sorry to jump in lately (I have hard times to follow the list), but I'm
> not sure it desirable to allow substitution in component types and view
> labels.
>
> This could lead to very obscure sitemaps (refer also to "dynamic
> sitemap" Stefano is strongly against), and since source/parameters for
> sitemap statements often are component-specific, I don't see any real
> functional use for this.
Completely agreed. I forgot about that attribute.
In theory, that attribute should have been map:label to indicate that
has special semantics, but that would be back incompatible.
So, the option is to leave it as it is, but remove the ability to make
labels dynamic.
> > Thinking about views, why it is necessary to declare views and
> > component's labels in every sub-sitemap? If first is just inconvenience,
> > second poses more serious treat: every sub sitemap dealing with views
> > must define own pool of components (read: use (sometimes: lots of)
> > memory), leading to scalability issues. I think there is need to come up
> > with the mechanism to lookup view labels on run-time. Any ideas?
>
> This could be achieved by a using a specialized ComponentSelector that
> holds the labels for each component. But this means the sitemap is no
> more self-contained (views behaviour can depend on the parent sitemap).
I agree with Vadim here: you should be declaring something *only* when
you want to override the behavior inherited by the parent sitemap.
Self-containment is a strong requirement, but in this case this isn't
really a limitation: if you want to specify your special behavior (means
override the inherited behavior) you specify so, otherwise, you are
'self-consistently' stating that you are using your parent's one on that
label.
Sure, this might break operation, but this is exactly the same if your
parent sitemap mapped a 'default' component on a different one and not
one that you were expecting.
>
> > And I have another view-related question: what should be the correct
> > view behavior for the following sitemap fragment:
> >
> > <map:generators default="file">
> > <map:generator type="file" src="..." label="content"/>
> > <map:generators>
> > ...
> > <map:generate src="data"/>
> > <map:transform src="data2page" label="content"/>
> > <map:serialize/>
> >
> > Now it seems invokes view right after generator.
>
> Jumping to a view occurs at the first statement having the label the
> view refers to, i.e. the generator in this case.
It should be the *last* one, not the first one.
The above fragment is very useful and stopping at the first label is
plain useless since we are simply stating that the 'content' of that
pipeline is coming after the transformation, overriding the default.
If Vadim is right and current behavior reflects what Sylvain says, we
have a bug.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<st...@apache.org> Friedrich Nietzsche
--------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: Views and RE: [VOTE] Retuning Sitemap Implementation
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
>
> Vadim Gritsenko wrote:
>
> >>>>3. Token expansion is allowed for all attributes.
> >
> > Done; yet there is an issue with the views, labels, and
> > map:generate|serialize|transform's type attribute. The issue is how
to
> > determine label of the particular component if at compilation time
name
> > of the component is not known (because of substitution).
>
> Sorry to jump in lately (I have hard times to follow the list), but
I'm
> not sure it desirable to allow substitution in component types and
view
> labels.
I tend to agree with you... btw, labels are not substituted - because
(in part) that they are allowed in <map:components> (where no
substitution possible).
> This could lead to very obscure sitemaps (refer also to "dynamic
> sitemap" Stefano is strongly against), and since source/parameters for
> sitemap statements often are component-specific, I don't see any real
> functional use for this.
One could come up with the example of usage; but I also do not think
that this functionality is required.
> > Thinking about views, why it is necessary to declare views and
> > component's labels in every sub-sitemap? If first is just
inconvenience,
> > second poses more serious treat: every sub sitemap dealing with
views
> > must define own pool of components (read: use (sometimes: lots of)
> > memory), leading to scalability issues. I think there is need to
come up
> > with the mechanism to lookup view labels on run-time. Any ideas?
>
> This could be achieved by a using a specialized ComponentSelector that
> holds the labels for each component. But this means the sitemap is no
> more self-contained (views behaviour can depend on the parent
sitemap).
>
>
> > And I have another view-related question: what should be the correct
> > view behavior for the following sitemap fragment:
> >
> > <map:generators default="file">
> > <map:generator type="file" src="..." label="content"/>
> > <map:generators>
> > ...
> > <map:generate src="data"/>
> > <map:transform src="data2page" label="content"/>
> > <map:serialize/>
> >
> > Now it seems invokes view right after generator.
>
> Jumping to a view occurs at the first statement having the label the
> view refers to, i.e. the generator in this case.
Shouldn't it be called after transformer? Or, if I want it to be after
transformer, I have to do something like this:
<map:generators default="file">
<map:generator name="file" src="...FileGenerator" label="content"/>
<map:generator name="file-nolabel" src="...FileGenerator"/>
</map:generators>
<map:match pattern="body-changes.xml">
<map:generate type="file-nolabel" src="xdocs/changes.xml"/>
<map:transform src="stylesheets/changes2document.xsl"
label="content"/>
<map:transform src="stylesheets/document2html.xsl"/>
<map:serialize/>
</map:match>
And this solution leads to issue #1: scalability problems. I'm just
imagining something like www.mycgiserver.com (thousands of users) on one
instance of Cocoon 2. It's a waste to allow every user have own pools;
and every user should have an ability to declare own labels. This leads
me to opinion that concerns are overlapping. Shouldn't it be possible to
declare labels without declaration of new components?
What do you think?
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Views and RE: [VOTE] Retuning Sitemap Implementation
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Vadim Gritsenko wrote:
> Most of the changes are done. PLEASE: test with your setup/sitemap, add
> more test cases to the lint/sitemap.xmap.
>
>
>>From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
>>
>>Vadim Gritsenko wrote:
>>
>>>>Summary of the proposed changes:
>>>>
>>>>1. A pipeline may contain *all* components at the first level.
>>>>
>>+5
>>
>
> Done, as far as I can test it - working all right.
>
>
>
>>>>2. Pipelines are to be validated against following rules:
>>>> (1) all pipelines must have generator or
>>>> reader|mount|redirect|call.
>>>> (exclusion: handle-errors already have a generator)
>>>>
>>+1
>>
>
> Done, add aggregator to the list.
>
>
>
>>>> (2) pipelines with generator|transformer must have serializer
>>>> (exclusion: handle-errors always must have serializer)
>>>>
>>+1
>>
>
> Done, also add aggregator to the list.
>
>
>
>>>> (3) readers|serializers|mount|call|redirect must never have
>>>>
> other
>
>>>> sitemap components after them.
>>>>
>>+1
>>
>
> Done.
>
>
>
>>>> (4) matchers and selectors without nested direct components are
>>>>illegal
>>>>
>>>>
>>-0, this is again a restriction which I think is not necessary
>>
>
> Commented out.
>
>
>
>>>>3. Token expansion is allowed for all attributes.
>>>>
>>>>
>>+5
>>
>
> Done; yet there is an issue with the views, labels, and
> map:generate|serialize|transform's type attribute. The issue is how to
> determine label of the particular component if at compilation time name
> of the component is not known (because of substitution).
Sorry to jump in lately (I have hard times to follow the list), but I'm
not sure it desirable to allow substitution in component types and view
labels.
This could lead to very obscure sitemaps (refer also to "dynamic
sitemap" Stefano is strongly against), and since source/parameters for
sitemap statements often are component-specific, I don't see any real
functional use for this.
> Thinking about views, why it is necessary to declare views and
> component's labels in every sub-sitemap? If first is just inconvenience,
> second poses more serious treat: every sub sitemap dealing with views
> must define own pool of components (read: use (sometimes: lots of)
> memory), leading to scalability issues. I think there is need to come up
> with the mechanism to lookup view labels on run-time. Any ideas?
This could be achieved by a using a specialized ComponentSelector that
holds the labels for each component. But this means the sitemap is no
more self-contained (views behaviour can depend on the parent sitemap).
> And I have another view-related question: what should be the correct
> view behavior for the following sitemap fragment:
>
> <map:generators default="file">
> <map:generator type="file" src="..." label="content"/>
> <map:generators>
> ...
> <map:generate src="data"/>
> <map:transform src="data2page" label="content"/>
> <map:serialize/>
>
> Now it seems invokes view right after generator.
Jumping to a view occurs at the first statement having the label the
view refers to, i.e. the generator in this case.
> Would like to hear comments/opinions/etc,
>
> Regards,
> Vadim
Sylvain
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org