From: <[EMAIL PROTECTED]>
>
> Hi again,
>
> >>In your particular case it'd be much better to return two values from
the
> >>action, just you different keys in the HashMap to do it:
>
> >>results.put("xsl-choice", "style _16");
> >>results.put("format", "fo2pdf");
>
> >>and then use it in your sitemap like this:
>
> <map:match pattern="blabla">
> <map:act type="allSelect">
> <map:generate src="sampleoutput.xml"/>
> <map:transform src="stylesheets/{xsl-choice}
> _{format}.xsl"/>
> <map:serialize type="{format}"/>
> </map:act>
> </map:match>
>
>
> The " <map:transform src="{xsl-choice}_{format}.xsl"/> " part works great.
>
> But the " <map:serialize type="{format}"/> " doesnt work. I always get a
> "Resource not found" error.
> If I type in the type manually (e.g. " <map:serialize type="fo2pdf"/> ")
it
> works.
Ah, sorry, I've misleaded you.
You cannot define the serializer this way. You should use a selector
instead. The serializer is determined before processing and it should be
fixed.
Maybe you could create resources for each output format and that way you
could call a particular resource like this:
<map:call resource="{format}" />
But I'm not sure that this will work either.
--
Konstantin
>
> What could cause this problem?
> I wonder, because the {format} in " <map:transform src
> ="stylesheets/{xsl-choice}_{format}.xsl"/> " works.
>
> Cheers
> Jonny
>
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>