Ross Gardler wrote:
...
> Another use case for what you suggest is the resources.xmap file.
> Imagine how much easier to follow it would be if we didn't have so may
> alternative locations for the image files. Nicola Ken hinted that this
> would be the case when I recently said I don't want to think that far
> forward yet. I wonder if this is what he meant?

Yes. As Thorsten has seen, Having the information early can make the
sitemaps much cleaner.

But instead of "exists", we should use another selector. Let me explain.

Cocoon has the notion of "Source", and there is also a
"TraversableSource". This means that I can go further than asking a
source if a file exists, I can ask to give me all the files that have a
given name except the extension. This would make it all much faster and
cleaner.

For example, if the TraversableSource is the file system, my action
would ask all the filenames in a certain directory, and with a for loop
get all the ones with the same name in the requested URI, sorting the
extensions as I tell him to. In this way, the result of the processing
is *one* *source* *file*!

Imagine, from the very beginning we know what the source is without
lengthy and tedious requests, and we can start processing by knowing
what the source is from the beginning.

Separation of Concerns: location resolving and processing fully
separate, also inside Cocoon.

-- 
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------

Reply via email to