You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by vo...@basf-it-services.com on 2002/03/25 10:54:09 UTC

Re: Substractive view labels [was : Re: aggregate and views : what'sthe correct behaviour ?]



Sylvain Wallez wrote:
>So my proposal was to allow to locally "substract" a label defined at
>the component level. The above snippet would then become :
>
>   <map:match pattern="body-todo.xml">
>     <map:generate type="file" src="xdocs/todo.xml" label="-content"/>
>     <map:transform src="stylesheets/todo2document.xsl" label="content"/>
>     <map:transform src="stylesheets/document2html.xsl"/>
>     <map:serialize/>
>   </map:match>

>>This is about a todo that says "View must start not from the first
>>encountered label, but from the last one".

If Views start from the last label, which IMHO make sence, but then
label="-content" is unnecessary.


>My opinion is that there are some uses case where automatic jump isn't
>good. Let's consider the following :
>  <map:view name="books" from-label="books">
>  ...
>  <map:aggregate element="root">
>    <map:part src="isbn-codes.xml" label="books"/>
>    <map:part src="authors.xml"/>
>  <map:aggregate>
>  <map:transform src="isbn2books.xsl" label="books"/>
>  <map:transform src="books2html.xsl"/>
>  <map:serialize/>
>
>The "books" view should give the list of books. With automatic jump, the
>above only gives a list of isbn codes and we cannot apply
>"isbn2books.xsl". On the contrary, explicit labels mean that there's no
>jump to the view from map:aggregate and that the stylesheet is correctly
>applied.

>So, in short, my opinion is that labels of map:part should be for
>_selecting_ which parts belong to the view, and that view branching
>should depend _only_ on the labels of map:aggregate.

>What is your opinion ?

Good idea!

Volker

------------------------------------------------------------------------
Volker Schmitt
BASF IT Services GmbH
Ludwigshafen, Germany



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


Re: Substractive view labels [was : Re: aggregate and views : what'sthe correct behaviour ?]

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
volker.schmitt@basf-it-services.com wrote:

>
>
>Sylvain Wallez wrote:
>
>>So my proposal was to allow to locally "substract" a label defined at
>>the component level. The above snippet would then become :
>>
>>  <map:match pattern="body-todo.xml">
>>    <map:generate type="file" src="xdocs/todo.xml" label="-content"/>
>>    <map:transform src="stylesheets/todo2document.xsl" label="content"/>
>>    <map:transform src="stylesheets/document2html.xsl"/>
>>    <map:serialize/>
>>  </map:match>
>>
>>>This is about a todo that says "View must start not from the first
>>>encountered label, but from the last one".
>>>
>
>If Views start from the last label, which IMHO make sence, but then
>label="-content" is unnecessary.
>
Why does it make sense ? Sorry, but I think the opposite :
- from a user point of view, knowing when branching will occur can 
become a nightmare since you have to crawl all branches that can 
participate in a request handling (matchers, selectors, actions, 
resource calls, etc) in search for this last label,
- implementation will be difficult, as it requires the whole regular 
pipeline (the view-less one) to be built before deciding at which point 
should occur branching,
- corrolary of the previous point, building the regular pipeline may 
have some side effects (e.g. actions) _after_ the branching label, but 
we cannot know beforehand that these actions shouldn't have been 
executed because they're not in the view.

So can you please elaborate more ?

<snip what="approval of aggregate proposal"/>

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@apache.org




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