Hi Geff,

thanks for your help. Ok.

Example:
_____________________________________________________________
My XSP, that should choose which XSL to use.:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java"
      xmlns:xsp="http://apache.org/xsp";
      xmlns:xsp-request="http://apache.org/xsp/request/2.0";>

  <xsp:structure>
      <xsp:include>java.sql.*</xsp:include>^
</xsp:structure>

  <results>
      <!-- Get the passed parameters (if there are any) -->
      <xsp:logic>

     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)
      // Choose number1.xsl
   else if( whichXSL == 2)
      // Choose number2.xsl
  else if( whichXSL == 3)
      // Choose number3.xsl
   ...

  // data data
  ...
  ...
________________________________________________________________________

Part of sitemap:
...
<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)?
How should my xsp look like then?
How should my xsl look like then?

Cheers
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.



|---------+---------------------------->
|         |           "Geoff Howard"   |
|         |           <cocoon@leveragew|
|         |           eb.com>          |
|         |                            |
|         |           01/23/03 04:27 PM|
|         |           Please respond to|
|         |           cocoon-users     |
|         |                            |
|---------+---------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                          |
  |       To:       <[EMAIL PROTECTED]>                                      
                                          |
  |       cc:                                                                          
                                          |
  |       Subject:  RE: Different stylesheets called on runtime?                       
                                          |
  
>------------------------------------------------------------------------------------------------------------------------------|




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 9:47 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Different stylesheets called on runtime?
>
>
>
> Thanks for the quick and helpfull response.
>
> Thats the answer I kind of expected and feared most. That means for me:
> Getting comfortable with actions.

Well, the good news is that in my opinion (and experience) actions are
about
as easy as it gets when extending cocoon.  There's only one method to
implement,
and the only contract you need to code for is to return null if the action
fails
and return a Map of the key-value pairs you need to reference in the
sitemap
if
the action is successful. (or any empty map if you don't need to reference
values
in the sitemap).

Ask some specific questions here about what problems you have getting
started.

Geoff Howard

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






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