Alexander Klimetschek skrev:
Reinhard Poetz schrieb:
I think the problem here is that we have two sources and depending on the context, one is the "main" source. But if it's only me having this view on that, I won't argue for it any more.

Any other opinions?

I tend to Reinhard's opinion: from the user POV the src should state the service, because that is where I get my data from, ie. the data that is used in the subsequent pipeline.

Interesting that there are such differing conceptual views on what the src attribute in a generator is supposed to do.

So my view (and what I until now thought everyones view) of a generator is that it is a component that transforms any input to a SAX stream. More specifically an important sub family of generator reads from an octet stream that is made available from a Source object that in turn is pointed to from the src attribute.

The above is AFAICS true for all generators in Cocoon this far. Now for the servlet service generator the idea is still that it reads it input from an octet stream made available from a Source object (e.g. a file source). Then it posts this octet stream to a servlet service which returns a response stream that is supposed to be in XML format. The generator in turn parses this XML stream to a SAX stream that is emitted to the next component in the pipeline.

So what is important here is that it is the file source in the example above that is input to the generator, not the servlet service. The servlet service is something that the input generator is redirected to.

In all generators that I am aware of the src attribute is used for pointing at the Source object that is the *input* of the generator. IMO it would be highly confusing for the users to switch this to a different convention for servlet service generators.

So to summarize, a the src attribute should point to the input of the generator.

/Daniel

Reply via email to