Hi Alfred Alfred Fuchs wrote:
> > Conal Tuohy wrote: > > > > [...] Alternatively, if it really is necessary to call back > > another pipeline, what about using a generic transformer like the > > XIncludeTransformer? > > I will explain, what I want to do: > > (1) I have a website with a topic "actual". > people should be able to upload HTML or (docbook)XML files > to this directory. > I want scan this directory and generate a overview of the files > with a description exctracted from the titles. > solutions: > - XPathDirectoryGenerator? but the HTML files? > - > DirectoryGenerator->CInclude-transformer->WriteTransformer-> > ...->HTMLGenerator->.... You could use DirectoryGenerator, transform the result into include statements that use the cocoon: protocol to refer back to your mime-type-specific pipelines (which return the file descriptions), then use the IncludeTransformer to import these descriptions. So the CIncludeTransformer for instance can call your pipelines, rather than the generator doing so. <snip/> > but at this stage a thought: > I have a pipeline for this file type (depends on the name) > and a pipeline for that file type. > > why not extend the mechanism of <map:aggregate> and > give a FileInfoDirectoryGenerator a prefix for a pipeline or resource, > that is calld on every found file. Yes I see your point. Maybe I've missed something, but I just wondered why this facility should be built into the generator - rather than performed as a subsequent step using an inclusion transformer.