cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject [RT] InputModules for sitemap variables
Date Fri, 24 May 2002 14:00:39 GMT
Hi team,

I looked at Chris's modules in mod-db and thought about using them for 
sitemap variable substitution.

Up to now, sitemap variables can only be set by matchers and actions, 
and we thus have a number of them whose primary purpose is to populate 
sitemap parameters. This includes e.g. RequestParamAction, 
RequestHeaderMatcher, SessionAttributeMatcher, etc.

Now what about allowing the use of InputModules in sitemap variable 
substitution ? For this, we need to extend the variable naming scheme : 
if a variable name contains a colon (':'), the string before the colon 
identifies an InputModule, and the string after the colon identifies an 
attribute name for the InputModule (see InputModule.getAttribute())

So the following snippet (copied from RequestParamAction javadoc) :
  <map:act type="request">
    <map:parameter name="parameters" value="true"/>
    <map:generate src="users/menu-{id}.xml">

could be written more simply :
  <map:generate src="users/menu-{request-param:id}.xml"/>

The only problem with this extended syntax is that it may break actions 
and matchers that return variables whose name contains a colon. AFAIK, 
no such component currently exists in Cocoon.

Chris, what about passing the full object model instead of just the 
Request to {Input, Output}Modules ? This would allow a wider range of 

Thoughts ?

Sylvain Wallez
  Anyware Technologies                  Apache Cocoon 

To unsubscribe, e-mail:
For additional commands, email:

View raw message