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: <[EMAIL PROTECTED]>
>>For additional commands, e-mail: <[EMAIL PROTECTED]>
>>
>
>
>
>
>---------------------------------------------------------------------
>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]>
>




---------------------------------------------------------------------
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]>

  • ... 罗鸣/eNet/技术服务事业部/系统部/总监
    • ... yuryx
      • ... KOZLOV Roman
      • ... Andreas Hartmann
        • ... yuryx
          • ... Andreas Hartmann
    • ... Andreas Hartmann

Reply via email to