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:
> 
> 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?

Personally, I don't like seeing alot of namespaces in my documents.
This is one of the reasons I try to avoid XSP whenever possible.
Also, many developers aren't going to want to write alot of Transformers.
Remember one of the main benefits of XSP is immediate gratification.
A new Generator was created and installed without restarting the web server.
With the transformer approach, we have to restart the web server everytime
we add a new class.  This isn't the way to go either.

What we need is a way to dynamically react to business oriented markup.
I am not sure what that way is right now.  I am wanting to explore solutions
that other people have come up with though.

S/MIME Cryptographic Signature

Reply via email to