I don't know if it's possible but why don't you try this :

<map:match pattern="db/*/*.xsp">
               <map:generate src="db/{1}/{2}.xsp" type="xsp"/>
         <map:transform src="xsl/db.generatexsp.xsl"/>
         <map:serialize type="xml"/>
</map:match>
<map:match pattern="db/*/*.html">
           <map:generate src="cocoon:/db/{1}/{2}.xsp"/>
          <map:serialize type="xml"/>
</map:match>


Lionel


At 22:44 17/03/2003 +0100, you wrote:
Hi,

I need to pass request parameters from one XSP to another

This is my sitemap
<map:match pattern="db/*/*.xsp">
<map:generate src="db/{1}/{2}.xsp" type="xsp"/>
<map:transform src="xsl/db.generatexsp.xsl"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="db/*/*.html">
<map:generate
src="http://web/implements/db/{1}/{2}.xsp"/>


                                <map:serialize type="xml"/>
                        </map:match>

As you can see, I call the XSP from my call to the HTML.
I need one XSP as a generator, because it must execute an ESQL query.
But, the XSP called in that match (html match) calls another XSP that uses the
request parameters.


However, they are not passed in that call.  I cannot use <map:parameter
name="use-request-parameters"> since this is for a transformer.

I need the same kind of thing, but for a generator.

Anyone with an idea ??

Some code:

This is my XSP that is called:
<?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";
                        xmlns:xsp-session="http://apache.org/xsp/session/2.0";
                        create-session="true">

        <xml>
                <query>
                        select fnSiteRegisteredUserInsert
('<xsp-request:get-parameter name="email"/>',
                                                '<xsp-request:get-parameter
name="password"/>')
                </query>
                <results>
                        <result>
                                <value>0</value>
                                <message>You have been registered</message>
                        </result>
                </results>
                <errors>
                        <error>
                                <value>ERROR: Cannot insert a duplicate key
into unique index tblsiteregistereduser_login_key</value>
                                <message>You already exist</message>
                        </error>
                </errors>
        </xml>
</xsp:page>

As you can see, that needs the parameters.


This is the XSL for transformation to a valid XSP


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
        xmlns:fo="http://www.w3.org/1999/XSL/Format";
                        xmlns:xsp="http://apache.org/xsp";
                        xmlns:esql="http://apache.org/cocoon/SQL/v2";
                        xmlns:xsp-request="http://apache.org/xsp/request/2.0";
                        xmlns:xsp-session="http://apache.org/xsp/session/2.0";

>

        <xsl:template match="/xml">
                <xsp:page language="java" create-session="true">

<xml>

                        <esql:connection>
                                <esql:pool>implements</esql:pool>

<esql:execute-query>
<esql:query>
<xsl:value-of select="query"/>
</esql:query>


                                        <esql:results>
                                                <esql:row-results>
                                                        <result>

<esql:get-columns/>
                                                        </result>
                                                </esql:row-results>
                                        </esql:results>

<esql:error-results>

<error><esql:get-message/></error>
                                        </esql:error-results>
                                </esql:execute-query>
                        </esql:connection>

                        </xml>
                </xsp:page>
        </xsl:template>
</xsl:stylesheet>

--
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be

Quote: The winner never says participating is more important than winning.

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


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



Reply via email to