>> Unfortunately, you've skipped the crucial part i.e. how the xsl is
chosen :-|

I think I don't understand you right., but this should be just an "dummy"
example.
So if(whichXSL == 1) then the number1.xsl should be choosen for output,
else if(whichXSL == 2) then the number2.xsl should be choosen for output,
bla, bla. I hope this is clearer.


>>  around one transform and use a returned value as file name, e.g.
>>
>>   <map:act type="sel-style">
>>      <map:transform src="{file}.xsl"/>
>>   </map>

Ok. But I don't get the part (in combination with the xsp) how, if for
example number2.xsl is choosen, to choose it.
How do I "produce" the return value in the xsp?


>>>> How should my xsl look like then?
>>no change.

Copy&paste mistake.

Thanks
Jonny





----------------------------------------------------------------------------------------------------

This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.



|---------+-------------------------------------->
|         |           Christian Haul             |
|         |           <[EMAIL PROTECTED]|
|         |           rmstadt.de>                |
|         |                                      |
|         |           01/23/03 06:14 PM          |
|         |           Please respond to          |
|         |           cocoon-users               |
|         |                                      |
|---------+-------------------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                          |
  |       To:       [EMAIL PROTECTED]                                        
                                          |
  |       cc:                                                                          
                                          |
  |       Subject:  Re: Different stylesheets called on runtime?                       
                                          |
  
>------------------------------------------------------------------------------------------------------------------------------|




On 23.Jan.2003 -- 05:42 PM, [EMAIL PROTECTED] wrote:
>      int whichXSL;
>
>       String report_id = request.getParameter("report_id");
>       String service_id = request.getParameter("service_id");
>       String nbt_pattern_id = request.getParameter("nbt_pattern_id");
>       String search_txt = request.getParameter("search_txt");
>       ...
>
>      // Check against a database, bla, bla
>      ...
>
>
>     // Now I want to choose the suitable XSL
>     if( whichXSL == 1)

Unfortunately, you've skipped the crucial part i.e. how the xsl is
chosen :-|

> ...
> <map:match pattern="differentXSLs">
>             <map:generate type="serverpages" src="differentXSLs.xsp"/>
>             <!-- if  "whichXSL == 1" -->
>             <!-- <map:transform src="number1.xsl"/>-->
>              <!-- if  "whichXSL == 2" -->
>             <!-- <map:transform src="number2.xsl"/>-->
>             <!-- if  "whichXSL == 3" -->
>             <!-- <map:transform src="number3.xsl"/>-->
>              ...
>             <map:serialize/>
> </map:match>
> ....
>
> So how and where should I place my action (and how should it look like)?

around one transform and use a returned value as file name, e.g.

   <map:act type="sel-style">
      <map:transform src="{file}.xsl"/>
   </map>

> How should my xsp look like then?

rip out everything related to the XSL

> How should my xsl look like then?

no change.

             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/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to