forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: [RT] plugin infrastructure
Date Wed, 03 Nov 2004 22:53:13 GMT
Nicola Ken Barozzi wrote:
> Ross Gardler wrote:
> ...
>> It seems to me that Cocoon decides that a matcher has done its work 
>> whenever a file is generated using <map:generate...>, in order to do a 
>> SourceTypeAction you have to generate the file first hence Cocoon 
>> marks the request as having been processed.
> Cocoon used to two things in the sitemap: search for a pipeline and then 
> execute it. Now things are more mixed, but when a generate is called, 
> than that pipeline is the last to be executed. IOW you are correct.
>> This assumption is based on the fact that the match for **.xml in the 
>> plugin works fine, but this only does a 
>> <map:generate...> whenever the relevant *.sxw or *.sxi exist, under 
>> these circumstances the match has done its job. If the sci/sxw files 
>> don't exist (i.e. the source file is really a *.xml file) then the 
>> <map:generate...>is never reached and so the subsequent matchers are 
>> used.
> What should be done is not to generate anything before we are sure that 
> processing must not continue outside of the parent of the <generate> tag.

Yes, that is where I was heading too. I've been reading Cocoon docs, and 
have come to the conclusion that we probably want something like 
ResourceExistsSelector, but that will check for a resource of a specific 
DTD, perhaps called resource-type-exists. For example:

<map:match pattern="**.xml">
     <map:select type="resource-type-exists">
        <map:parameter name="file" value="content/xdocs/{1}.xml"/>
        <map:when test="DTD_public_ID">
           <map:generate src="content/xdocs/{1}.xml" />
           <map:serialize type="xml" />

I can go ahead and do this, but does anyone have any other ideas (or 
should I ask this question over at Cocoon?)


View raw message