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">
  </map:act>

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

Thoughts ?

-- 
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]

Reply via email to