cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [RT] Fixing the CLI
Date Wed, 05 Mar 2003 15:07:30 GMT


Nicola Ken Barozzi wrote, On 05/03/2003 15.12:
> 
> 
> Upayavira wrote, On 05/03/2003 14.20:
...
>> I've posted my code as a patch to bugzilla. Let me know what you 
>> think. Should this be done using pluggable pipelines? 
...

Ok, I took a look (cannot run the patch yet ATM, so only looking):

In FileSavingEnvironment you do (along other things)

   this.objectModel.put(Constants.LINK_COLLECTION_OBJECT, gatheredLinks);

and in the interpreted sitemap you do this:

 
if(env.getObjectModel().containsKey(Constants.LINK_COLLECTION_OBJECT)) {
            context.getProcessingPipeline().addTransformer(
                 "<gatherer>", null, Parameters.EMPTY_PARAMETERS,
                                     Parameters.EMPTY_PARAMETERS
            );
}

So basically we are adding a contract to the sitemap, by saying that 
each sitemap implementation has to provide a list of links if requested 
to (as seen above).

Thinking about pluggable pipelines, since they are set in the sitemap, 
it's better if we don't mess with them, but we have to use the ones that 
the sitemap requests. The approach in the patch is better.

Also, the LinkTranslator.java is in the sitemap package. I would gather 
that in fact it makes sense to fully include this requirement in a 
sitemap contract.

So, from quick glance, it seems that the way it's done is IMHO the right 
way.

You wrote in bugzilla:
"
This code appears to try to check pages that begin with #, javascript: 
or http://. I plan to prevent this, and probably sort other things too, 
but I'd like to see what people think of this code before I do anything 
else.
"

Could you please explain it a bit more, and the changes you'd like to 
make. Especially, is this behaviour different from the previous one?

Also, have you yet measured the speed increases?
Is it possible to also have the same 3 step behaviour there was before?

Thanks :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message