> From: Sylvain Wallez [mailto:[EMAIL PROTECTED]] > Konstantin Piroumian wrote: > >>From: Sylvain Wallez [mailto:[EMAIL PROTECTED]] > >>Konstantin Piroumian wrote: > >> > >>>Good evening! > >>> > >>>How difficult would be to redesign <map:redirect-to /> to allow > >>>parameters? > >>>E.g.: > >>><map:redirect-to uri="..."> > >>> <map:parameter name="p1" value="1" /> > >>> ... > >>></map:redirect> > >>> > >>Aren't you looking for <map:redirect-to > >>uri="other-uri?p1=1&p2={sitemapvariable}"/> ? > >> > > > >Yes, this would do, but <map:parameter /> looks better, IMO. > >I've took a look at redirection interface and it seems that > adding one more > >method that takes also a parameter map will be enough for > redirection. But I > >have no yet idea how would the receiving pipeline (or > resource) handle those > >parameters. It must be something similar to 'target' attribute. > > > > Be careful : redirect to URI results in a new request being processed > and so loses the sitemap variables, while redirect to > resources occurs > internally in the current sitemap. Because of this confusion, > redirect > to resource was deprecated in favor of map:call.
So, the new question is: does map:call support parameters? ;) > > Thus all we can do with parameters in map:redirect is encode them as > request parameters. So it's really a matter of readability... What about the <map:redirect-to uri="cocoon:/" />? This one handled internally. Maybe it'll be better to rename it to <map:forward-to pipeline="without-any-protocol" /> as real redirect and internal forward are quite different in usage? And <map:forward> can have parameters just like the request attributes. Btw, it would be fine to have sitemap processor version in sitemap. This will allow things like: <map:select type="processor"> <map:when test="treeprocessor"> <!-- or by version '2.1' --> <map:forward-to path="/..." /> </map:when> <map:otherwise> <map:redirect-to uri="/..." /> </map:otherwise> </map:select> Of course, this will be rarely used, and I just want to know what others think about it. Konstantin > > Sylvain > > -- > Sylvain Wallez > Anyware Technologies Apache Cocoon > http://www.anyware-tech.com mailto:[EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]