You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/07/11 09:40:59 UTC

[VOTE] RE: request info action

> > But I have been wondering a couple of times...
> > Shouldn't there be some common standard parameter
> > available in the substitution map?! Like:
> >
> > - requested uri
> > - servlet context or base-uri
> > - query parameters
> >
> > Or is an action the better and cleaner way to go?
> 
> i'm _all_ for being able to access this data via the substitution map.
> occasionally, i want to be able to use a request parameter in the sitemap
> but i can't. the servlet context would be an easy way to allow users to
> issue context-absolute redirects in the sitemap without having to
> hard-code the current context path.

That's exactly how I feel. The only question is:
Is it good to have this alway available in the substitution map?
(as you said: you want it "occasionally") Or will an action do?

Votes please.


I will add this... one or the other way.

I was also wondering if we shouldn't have {0} as parameter as well.
In "awk" e.g. (as well as other regexpr matchers) this means
the whole string. Would be more consitent... anyway

This is what I propose as substitution parameters:

requestURI     - the requested URI (without parameter) (this will of course make {0} obsolete)
requestQuery   - the query parameter (including the "?") like "?test=bla&something=2"
                 so {requestURI}{requestQuery} will give always give the full URI + parameters
context        - the servlet context (usually "/cocoon")
sitemapContext - the context change from a sitemap to a sub-sitemap (e.g. "sub" for the sub sitemap
                 example


Please feel free to add some more and
maybe one of you guys have better/shorter ideas for
the parameters?!
--
Torsten

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


Re: [VOTE] RE: request info action

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 11.Jul.2001 -- 09:40 AM, Torsten Curdt wrote:
> > > But I have been wondering a couple of times...
> > > Shouldn't there be some common standard parameter
> > > available in the substitution map?! Like:
> > >
> > > - requested uri
> > > - servlet context or base-uri
> > > - query parameters
> > >
> > > Or is an action the better and cleaner way to go?
> 
> That's exactly how I feel. The only question is:
> Is it good to have this alway available in the substitution map?
> (as you said: you want it "occasionally") Or will an action do?
> 
> Votes please.

I'd prefer an action because I would support the "occasionally"
argument. It's probably not very expensive to create a couple of
objects in the root map. On the other hand every unecessary object
creation should be avoided.

+1 for action

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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