On Tuesday 25 June 2002 10:39, Christian Haul wrote: > On 25.Jun.2002 -- 10:13 AM, Torsten Curdt wrote: > > hm... if we'd go that far "request:getParameter(bla)" would probably the > > most straight forward syntax for those users. But sooner or later there > > will be requests asking for default values (if a parameter is not set) > > and we end up with a mini-scripting language. I doubt we want to > > encourage that... do we? > > See my other post. > > "getParameter(bla)" is the _name_ of the parameter. > "request:bla" is just sitemap syntax for > > value = module.getAttribute("bla", null_config, objectModel); > > In addition getAttributeValues() and getAttributeNames() exist.
I know... but the question was if we want to have request-parameter:bla request-header:blub or request:parameter:bla request:header:blub and I said if we would go for one module per context (request,session,..) for most users the following syntax might be most straight forward request:getParameter(bla) request:getHeader(blub) ...but then there are the concerns as I stated... > Get yourself default values (from current cocoon.xconf): > > <component-instance > class="org.apache.cocoon.components.modules.input.DefaultsMetaModule" > name="defaults"> <input-module name="request"/> > <values> > <skin>defaultSkin</skin> > <base-url>http://localhost:8080/cocoon</base-url> > </values> > </component-instance> > > Add other defaults ad lib. Use this with any other input module. Well, but I bet people want default values per use... (this is not a proposal just an example ;) something like: request:geParameter(bla,default) or request:getParameter(bla)?getParameter(bla):null ..and this would be the beginning of the mini-scripting language be probabaly all don't want inside the sidemap... Sorry, for not making that clear ;-) -- Torsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]