forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [RT] plugin infrastructure
Date Wed, 03 Nov 2004 23:33:28 GMT
Ross Gardler wrote:
...
> 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" />
>        </map:when>
>     </map:select>
> </map:match>
> 
> I can go ahead and do this, but does anyone have any other ideas (or 
> should I ask this question over at Cocoon?)

Isn't this ok?

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

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message