Joerg Heinicke wrote:
I'm not sure if we are talking about the same. If I take Reinhard's
sample [1]
URL baseUrl = new URL("file:///C:/temp/");
Pipeline pipeline = new NonCachingPipeline();
pipeline.addComponent(new FileGenerator(new URL(baseUrl, "xyz.xml"));
pipeline.addComponent(new XSLTTransformer(new URL(baseUrl, "xyz.xslt"));
pipeline.addComponent(new XMLSerializer());
pipeline.invoke(new InvocationImpl(System.out));
Ok, up to here we are talking about the same :) Adding the
sourceresolver and sources to the above example and let the sources
return the urls should be easy. That's more or less what you do today.
and want to add caching to it and therefore have to switch from URL to
Source and from FileGenerator to CachingFileGenerator - sorry, but
that's a mess since this means pretty much rewriting the application for
adding caching. Why is this page so slow? Oh, sorry we forgot this
pipeline to switch to caching ...
Ah, no no, I'm not saying this :) There should only be one file generator.
Let's use the above example: you setup the pipeline as shown above and
then do a:
Pipeline cachingPipeline = new CachingPipeline(pipeline);
Et voila! That's all you have to do.
Now, as I answered to Ralphs mail, I don't know if this is possible or
how to do it right now. So it might turn out that it's not or it's not
worth doing it.
That's why I wonder where a pipeline writer gets into uri resolving at
all? Why does he have to care about URLs or Sources? That's the
component developer's concern.
The pipeline writer needs to know how uri resolving works. He needs to
know what input values are allowed, what relative values mean etc.
But I will turn around the questions :) What caching do you need? The
ultra complex caching we currently have which can cache partial
pipelines? Or just the result of a pipeline?
Carsten
--
Carsten Ziegeler
[EMAIL PROTECTED]