cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject RE: [Patch][C2.1] sitemap redirections + target spec
Date Thu, 21 Jun 2001 19:03:03 GMT
> -----Original Message-----
> From: Donald Ball [mailto:balld@webslingerZ.com]
> 
> 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,

Originally I thought that <map:resource> may easily require more then one attribute
- that's 
why <map:parameter> was suggested...

> 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...?

But this seems like even better solution.

BTW, Is it FS or not? :)

> 
> - donald
> 

Vadim


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


Mime
View raw message