cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yuryx <yu...@mobicomk.donpac.ru>
Subject Re: Help on sitemap
Date Thu, 14 Mar 2002 10:59:43 GMT
Andreas Hartmann wrote:

>
>Hi Yury,
>
>
>>бчцЫ/eNet/╪╪йУ╥ЧнЯйбр╣╡©/о╣мЁ
>>
>╡©/вэ╪Ю wrote:
>
>>>Hello All,
>>>        I hava a question for sitemap
>>>        how can i write a sitmap:
>>>                if i request http://site/test.xml
>>>                                it will transform by default.xsl
>>>                if i request http://site/test.xml?sytle=test.xsl
>>>                                it will transform by test.xsl
>>>
>>>Thanks
>>>
>>Try define sitemap parameter in action from request
>>
>
>What about using a RequestParamAction?
>
>Greetings,
>Andreas
>
2Andreas:
My example just more for undestand of cocoons action's work. (May be :) )

Regards.
Yury.

>
>>Like:
>>public class MyAction extends AbstractAction {
>> public Map act (Redirector redirector,
>>                 SourceResolver resolver,
>>                 Map objectModel,
>>                 String source,
>>                 Parameters params) {
>>
>>   Map sitemapParams = new HashMap();
>>   Request request = (Request) 
>>objectModel.get(Constants.REQUEST_OBJECT);   
>>   String mStyle=request.getParameter("style");
>>   sitemapParams.put("style", mStyle);
>>
>>   return sitemapParams;
>> }
>>}
>>
>>in sitemap:
>>
>>  <map:match pattern="test/*">
>>   <map:generate type="serverpages" src="work/test/{1}.xsp"/>
>>   <map:act type="MyAction">
>>
>>   <map:transform src="work/test/{style}"/>
>>
>>   </map:act>
>>   <map:serialize type="html"/>
>> 
>>  </map:match>
>>
>>Regards.
>>Yury.
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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: <cocoon-users-unsubscribe@xml.apache.org>
>>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>>
>
>
>
>
>---------------------------------------------------------------------
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>




---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message