cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: C2: Pre- & Post-Transformers
Date Fri, 07 Jul 2000 12:20:12 GMT
Niclas Hedhman wrote:
> 
> "Timm, Sean" wrote:
> 
> > It seems like it would be useful to have pre- and post-transformers that are
> > applied prior to and after all other transformers on a per-pipeline basis.
> > Obviously this isn't necessary, since you could list the transformers in
> > every single match you had, but it would ease the administration of common
> > transformers (especially when you had to change something).  For instance,
> > maybe you want XInclude to run every time for a certain pipeline prior to
> > any of your other transformers (or after your other transformers...or both).
> > Does anyone else see this as useful?  Maybe something like the following:
> 
> -1;
> IMHO, it breaks cleanliness of the Sitemap, introduces more complexity for the
> sitemap processor (must make sure there are only transformers in the
> pre-pipeline for instance.)
> 
> I would instead suggest an "include" of commonly re-occurring segments.

Hmmmm, good point, but I'd leave this for later after we have more
feedback.
 
> Niclas
> 
> >
> >
> > <map:pipeline>
> >   ...
> >   <map:pre-transform>
> >     <map:tranform type="xinclude"/>
> >   </map:pre-transform>
> >
> >   <map:post-transform>
> >     <map:choose>
> >       <map:when test="is('Mozilla5')">
> >         <map:transform src="./stylesheet/site-xul-skin.xsl"/>
> >       </map:when>
> >       <map:otherwise>
> >         <map:transform src="./stylesheet/site-skin.xsl"/>
> >       </map:otherwise>
> >     </map:choose>
> >   </map:post-transform>
> >
> > </map:pipeline>

No -1 as well.

A couple of reasons:

1) XInclude should not be a filter but something that it's built-in the
cocoon processing chain, just like xbase or schema validation or
namespaces.

2) you risk to make "pipelines" behave as "pipes". Anyway, you'll do
pre-post processing with mounting

 <match>
  ..do something pre..
  <mount>
  ..do something post..
 </match>

but should not influence how the pipe works.

3) your stuff doesn't work at all where is the serializer? sure, you
could add your serializer in the post process, but then isn't this just
like placing it into the pipe?

I understand you do this only to reduce verbosity and I agree that
verbosity reduction is almost always a Good Thing(TM), but sometimes it
removes readability....

BTW, if your sitemap is too verbose, probably your URI space sucks :)

I picture sitemap verbosity as a "measure" of your URI space
complexity... so you have a _clear_ feedback of what's going on and you
have a coherent view of the whole addressing scheme.

But again, these are just speculations, we need more real-life feedback.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message