cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Elam <>
Subject Overloaded pipeline elements (Was Re: [RT] FOM)
Date Wed, 28 May 2003 05:49:15 GMT
Stefano Mazzocchi wrote:

>on 5/27/03 4:19 PM Sylvain Wallez wrote:
>>How is this different from a resource? Resources also allow to define 
>>overloaded generators and transformers. So do we really need a new concept ?

>Resources were supposed to be reusable pipelines, but *complete* ones!
>Later, they were implemented to be usable as pipeline fragments but,
>IMO, they impose some readability problems in the sitemap. The above
>aims to correct that.
>In fact, if the above is introduced, I would deprecate the use of
>resources that do not have a complete pipeline.

What is the purpose of resources if this new syntax goes into effect 
(which I like by the way)?  What can a resource do that an overloaded 
pipeline element cannot?

Also, would this add to the learning curve?  The docs would need to reflect

  overloaded generator contains exactly one generator and one or more 
  overloaded tranformers contain two or more transformers
  overloaded serializers contain one or more transformers and exactly 
one serializer

Once people grasp the concept of a pipeline and understand it 
completely, this will be a no-brainer.  But I expect there will be a 
large number of people who will come to the list asking about why their 
overloaded generator doesn't work because they added a serializer to the 
definition as in:

    <map:generator name="html" src="tidy stuff"/>
    <map:generator name="html">
      <map:generator type="html"/>
      <map:transformer type="linkrewriter"/>
      <map:serializer type="html"/>

and then

    <map:match pattern="foo">
      <map:generate type="html" src="foo.html"/>

I think the expectation that a "super()" method would be called by 
overloading the pipeline element is asking for trouble with regard to 
user confusion.

Personally I would be happy to see the new syntax (pipeline component 
groups), but is all of the baggage accounted for?  Or would clear error 
messages be sufficient to mitigate major problems?

- Miles Elam

View raw message