cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: [RT] Alternative Solution to XSP
Date Fri, 22 Jun 2001 09:47:37 GMT
> Donald Ball wrote:
>
> On Thu, 21 Jun 2001, Berin Loritsch wrote:
>
> > > for this to work in the current environment, i'd have to
> known that the
> > > 'my' transformer is probably going to need to call the 'sql'
> transformer
> > > immediately after it. that should not be the concern of the sitemap
> > > maintainer...
> >
> > And we are back to another one of your points on XSP: ordering
> is difficult
> > and has profound effects on the resultant code.
>
> right! so what i'm thinking now is that we can write an
> InspectionTransformer which can call other Transformers seamlessly - at
> least, Transformer which have registered themselves as being responsible
> for a particular namespace. let's see:
>
Yes, this is actually a transformer I was also thinking of some time ago
as I tried to understand why xsp taglibs can be used without any further
work then registering them and why transformers have to be declared
explicitly in the sitemap.

One main problems which is not easily to solve is caching:
The InspectionTransformer can not be cacheable and therefore is the
disadvantage that the whole transformation stage is not cacheable
even if the transformers currently used are cacheable.
As most transformers (except the xsl transformer) are highly dynamic
this point might be neglectable.

I thought of implementing/adding such components like this transformer
to a stable and finished C2.0 release, perhaps for starting the C3
architecture...


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================

> public class InspectionTransformer {
>
>   static Map registeredTransformers;
>
>   public void startElement(String uri, String name, String raw,
> Attributes attributes) {
>     if (registeredTransformers.containsKey(uri)) {
>       Transformer transformer = //obtain reference to other
> transformer somehow
>       transformer.compose(...);
>       transformer.setup(...);
>       transformer.setContentHandler(this);
>       transformer.startElement(uri,name,raw,attributes);
>     } else {
>       super.startElement(uri,name,raw,attributes);
>     }
>   }
>
>   ...
>
> }
>
> naturally, some more thought is required here - one would not necessarily
> want to create a new Transformer instance for every element we find in the
> new namespace; probably we'll need to maintain some sort of stack of
> transformers inside the InspectionTransformer. but this is the gist.
> thoughts?
>
> - donald
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


Mime
View raw message