cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neo99 <>
Subject SourceWritingTransformer followed by authentication does not write
Date Tue, 16 Nov 2004 19:50:06 GMT
I hope someone can point me in the write direction.
I'm trying to create a pipeline where the user is registered and 
authenticated in one go.
After the user submits registration details (username and password) 
using a form, I want to save those details to a userlist and then 
authenticate against that same userlist.

Here is the relevant part of the pipeline I'm using:

<!-- snipet -->
       <!-- new username so register user!-->
       <map:generate src="authentication/docs/usertemplate.xml"/>
       <map:transform src="authentication/stylesheets/create-user.xsl"> 
<!-- create the fragment for the write-source transform -->
             <map:parameter name="name" value="{request-param:username}"/>
             <map:parameter name="password" 
       <map:transform type="write-source"/> <!-- appends registration 
details to userlist.xml -->
       <!-- <map:serialize type="xml"/> --> <!-- test -->   
       <!--Authenticate new user (repeated from above)-->
       <map:act type="auth-login">
             <map:parameter name="handler" value="sitehandler"/> <!-- 
authenticates against userlist.xml -->
             <map:parameter name="parameter_name" 
             <map:parameter name="parameter_password" 
             <!--Authentication succeeded-->
             <map:redirect-to uri="{request-param:loginresource}"/>
       <map:redirect-to uri="nologin"/>
<!-- snipet (end)-->

If I remove the comments from the
<!-- <map:serialize type="xml"/> -->
line. The SourceWritingTransformer works and writes the required 
registration data to the userlist file.

But if I place that line back inside comments, so that authentication 
can take place. The authentication fails, because the 
SourceWritingTransformer has not written the required registration 
details to the userlist file.

Is this the appropriate behaviour for the SourceWritingTransformer? Is 
it only supposed to write to the filesystem when the pipeline reaches a 
Is there a way I can accomplish both writing to a file and using that 
same file within the same pipeline? Or is there another way I should be 
doing this?

This is my first project using Cocoon. I'm using Cocoon

Thank you, in advance!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message