Hunsberger, Peter wrote:

Unico Hommes <[EMAIL PROTECTED]> writes:


Hunsberger, Peter wrote:



Upayavira <[EMAIL PROTECTED]> writes:

<snip/>





Therefore, I think we need an I18N input module. It would do
something like:

<map:match pattern="**/*.html">
<map:generate src="{1}/{i18n:{2}.{locale}.xml"/>
...
</map:match>

[NB. I'm not sure if nested input modules are allowed, so the syntax
might need to change, but the idea should be sound]





I believe what you want is:

<map:generate src="{1}/{i18n:{2}}.{locale}.xml"/>

Or

<map:generate src="{1}/{i18n:{2}.{locale}}.xml"/>

? (Note the extra }) In any case, that currently doesn't

work. You can


specify:

<map:generate src="{1}/{i18n:2}.{locale}.xml"/>

Which results in the value of {2} being substituted after the module returns so that the value isn't passed to the module but rather down stream, to the consumer of the module output, which seems rather useless to me, in particular if the module is outputting XML.

I also have a need for this general pattern, but a quick look at the code did not reveal any easy way to do this. If you come up with something please post your solution. :-) We just made a hard coded assumption that so far works for all our use-cases...

<snip/>





I think what you are looking for is the InputModuleAction that currently resides in the xsp block and which allows you to pass sitemap parameters to input modules.



For our case we need this as follows:


<map:match pattern="*/**">
<map:select type="request-method">
<map:when test="POST">
<map:call
continuation="{continuationsModule:{2}}"/> </map:when>
<map:otherwise>
<map:call function="main">
<map:parameter name="p1" value="{1}"/> <map:parameter name="p2" value="{2}"/> </map:call>
</map:otherwise>
</map:select>
</map:match>


I don't see how an action would help here????  At best it could remap
the parameter but it still wouldn't be passed to the input module?




From the java docs I deduce it would go something like this:


<map:act type="inputmodule"&gt;
  <map:parameter name="module" value="continuations"/>
  <map:parameter name="attribute" value="{2}"/>
  <map:call continuation="{1}"/>
</map:act>

--
Unico

Reply via email to