You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tuomo Lesonen <tl...@cc.hut.fi> on 2002/08/07 15:53:27 UTC

Dynamic parameter names in sitemap

Hi,

Does anyone have any ideas on how to make the names of the sitemap
parameters dynamic, this way:

<map:match pattern="*">
  <map:act type="auth-protect">
    <map:parameter name="handler" value="testhandler"/>
    <map:select type="parameter">
      <map:parameter name="parameter-selector-test" value="{../{../../1}}"/>
      <map:when test="true">
	<map:redirect-to uri="foo"/>
      </map:when>
      <map:otherwise>
	<map:redirect-to uri="bar"/>
      </map:otherwise>
    </map:select>
  </map:act>
</map:match>

In the example above, the name of the parameter gotten from auth-protect
is not known, but is fetched from the matcher wildcard. I have about 20
resources where I need this, so I wouldn't want to write them all open in
the sitemap.

I'd really appreciate quick help on this!

Thanks,
Tuomo


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Dynamic parameter names in sitemap

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 07.Aug.2002 -- 04:53 PM, Tuomo Lesonen wrote:
> Hi,
> 
> Does anyone have any ideas on how to make the names of the sitemap
> parameters dynamic, this way:
> 
> <map:match pattern="*">
>   <map:act type="auth-protect">
>     <map:parameter name="handler" value="testhandler"/>
>     <map:select type="parameter">
>       <map:parameter name="parameter-selector-test" value="{../{../../1}}"/>
>       <map:when test="true">
> 	<map:redirect-to uri="foo"/>
>       </map:when>
>       <map:otherwise>
> 	<map:redirect-to uri="bar"/>
>       </map:otherwise>
>     </map:select>
>   </map:act>
> </map:match>
> 
> In the example above, the name of the parameter gotten from auth-protect
> is not known, but is fetched from the matcher wildcard. I have about 20
> resources where I need this, so I wouldn't want to write them all open in
> the sitemap.

IMO this is not supported. If you need this, consider moving to the
flow layer.

	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

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>