cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject RE: [Patch][C2.1] sitemap redirections + target spec
Date Thu, 21 Jun 2001 18:22:36 GMT
On Wed, 20 Jun 2001, Vadim Gritsenko wrote:

> > > The attached patch adds the ability to specify a "target" in a
> > > <map:redirect-to resource=""> tag. The "target" is available as "{1}"
> > > in the resource specification.
> >
> > Why not as "{target}"? And why not substitutable?
>
> I would not say why not to use <map:parameters> as elsewhere else...
> Like:
>     <map:match pattern="test">
>       <map:act type="form-validator">
>          <map:parameter name="descriptor" value="context:///descriptor.xml"/>
>          <map:parameter name="validate-set" value="user-input"/>
>  	<map:redirect-to resource="simple-page">
>                <map:parameter name="target" value="OK"/>
>             </map:redirect-to>
>       </map:act>
>       <map:redirect-to resource="simple-page">
>           <map:parameter name="target" value="ERROR"/>
>       </map:redirect-to>
>     </map:match>
>
> This would be much more consistent.

well, there are other sitemap components, e.g. filegenerator, which needs
to be parameterized with the location of its datasource - and rather than
using <map:parameter name="src" ... /> we just use a src attribute... i
guess a rule of thumb would be that components which use a single
parameter should use an attribute, while components which use more than
one parameter should use map:parameter elements. but maybe we should think
about making that a transparent choice? e.g.

<map:generate type="file" src="foo"/>

and

<map:generate type="file">
  <map:parameter name="src" value="foo"/>
</map:generate>

would appear the same to the FileGenerator...?

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message