cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Cording <>
Subject RE: SQLTransformer not committing Inserts
Date Tue, 16 Sep 2003 00:58:06 GMT
Some more information and a work around.
The XLST Transformer isn't even invoked.  I can add random characters to
CodeAddTest.xsl to make it an invalid XSL file and no error is produced.
Interestingly if I use a DBAction (which I don't want to do) everything
works as intended.
The work around is to turn the pipeline being redirected to into a resource
and call the resource instead of redirecting to the pipeline.

-----Original Message-----
From: Dean Cording []
Sent: Tuesday, 16 September 2003 9:23 AM
To: Cocoon Users (E-mail)
Subject: SQLTransformer not committing Inserts

I am having some problems with SQLTransformer not commiting inserts into a
database.  I am running Cocoon 2.1 and MS SQLServer.
My pipeline looks like:
               <map:match pattern="CodeCreate-add">
                    <map:generate type="request"/>
                    <map:transform type="xslt" src="CodeAddTest.xsl">
                        <map:parameter name="use-request-parameters"
                    <map:transform type="sql">

                        <map:parameter name="use-connection"
                        <map:parameter name="show-nr-of-rows" value="true"/>

                        <map:parameter name="isupdate" value="true"/>
                    <!-- Redirect back to the table display page -->
                    <map:redirect-to uri="CodeTableList"/>

And CodeAddTest.xsl looks like:
<xsl:stylesheet version="1.0" xmlns:xsl=" <>
<> ">
    <xsl:param name="CodeType"/>
    <xsl:param name="CodeValue"/>
    <xsl:template match="/">
        <execute-query xmlns="
<> ">
                INSERT INTO Codes (CodeType, CodeValue)
                VALUES ('<xsl:value-of select="$CodeType"/>', '<xsl:value-of

The values to be inserted are generated from a form and passed in as request
parameters.  At the end of the pipeline it redirects to a list page that
shows all of the values in the database.  The problem is that the new values
aren't being inserted.  If I remove the redirect (and replace it with a
static page for example) then the insert works fine.
Any ideas?

View raw message