On 24.Jul.2001 -- 08:30 AM, Max Larsson wrote:
> <map:match pattern="*.html">
> <map:act type="login-request">
> <map:generate type="serverpages" src="helpdesk.xsp"/>
> </map:act>
> <map:serialize/>
> </map:match>
>
> to:
>
> <map:match pattern="*.html">
> <map:act type="login-request">
> <map:generate type="serverpages" src="{1}.xsp"/>
> </map:act>
> <map:serialize/>
> </map:match>
>
> C2 fails. To explain a little bit: I want that {1} is replaced with
> the matching filename from the pattern of map:match element. I guess
> that my self written action forgets to forward the values from the
> matcher. But unfortunaly i have no idea how to do that. Or am i on
> a completely wrong way?
This should really be a faq: These maps are hierarchically organised,
thus the action stacks a new map on top of the previous ones,
i.e. the one returned by the matcher. Use path expressions to access
any other than the most recent one: e.g. {../1} for the next to last
one. Hence try
<map:match pattern="*.html">
<map:act type="login-request">
<map:generate type="serverpages" src="{../1}.xsp"/>
</map:act>
<map:serialize/>
</map:match>
If this isn't a faq I will add it later today...
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
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/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>