If you use the XMLDBTransformer, please check the following patches that will make it work better (especially if it doesn't seem to work at all):

http://issues.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=product&type0-0-0=substring&value0-0-0=XMLDB&field0-0-1=component&type0-0-1=substring&value0-0-1=XMLDB&field0-0-2=short_desc&type0-0-2=substring&value0-0-2=XMLDB&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0-3=XMLDB

Lars Huttar wrote:

Another way is using the source-writing transformer.
http://cocoon.apache.org/2.1/userdocs/transformers/sourcewriting-transformer.html
We are using this successfully.
I have not tried velocity/xmldb though so I can't say source-writing
is better or worse.

Lars



-----Original Message-----
From: Rui Alberto L. Gon�alves [mailto:[EMAIL PROTECTED]
Sent: Friday, September 03, 2004 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Writing files with cocoon


Hi David, you can do this in various ways, I'm presenting to simple options.

Using velocity... See documentation/examples how to write
the velocity template. Just checking examples you can solve
your problem.

sitemap.xmap
<map:match pattern="form_action">
<map:generate type="velocity" src="produce_doc.vm/>
<map:transform type="xmldb"/>
<map:serialize type="xml"/>
</map:match>

If you just want to use xslt...

sitemap.xmap
<map:match pattern="form_action">
<map:generate src="dummy.xml"/>
<map:transform src="your_style_to_produce_xml.xsl">
 <map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="xmldb"/>
<map:serialize type="xml"/>
</map:match>

dummy.xml is a file used just to start the pipeline with a generator. (this is not a really clean solution, but... :)
This file could be something like <root></root>
Then in your stylesheet have something like:


<xsl:stylesheet ...

 <xsl:param name="form_parameter1"/>
 <xsl:param name="form_parameter2"/>
 <xsl:template match="root">
  ... <!--
produce xml to xmldb transformer using
parameter values found in request.

 </xsl:template>
/xsl:stylesheet>

Hope this helps.

Rui




On Fri, 2004-09-03 at 16:56, David Verdin wrote:

Hi everybody,

I'm currently trying to write the result of a form filling

to a file.

I could understand how to handle this filling and to pass it to a
sitemap.

My problem is now to be able to write this to a file, created
dynamically.
The final aim is to update a Xindice database. I know there are some
wikis to understand how to use Xindice with XMLforms in

Cocoon, but as

there is no longer support of XMLforms in Cocoon 2.1, I'm trying to
achieve my own implementation.

The problem is that I am *really* bad at Java, or even Javascript
coding. So I try to use XSLT.
My idea is to use an XSLT transformation to create an XML

document in

Cocoon, and then write this to a file. Is this possible ?

Cheers,

David
--
************************************
David Verdin
GES / ENSAR - laboratoire d'informatique
65, rue de St Brieuc
CS 84 215
35 042 Rennes cedex
e-mail : [EMAIL PROTECTED]
t�l : 02 23 48 54 58
fax : 02 23 48 54 50
************************************


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

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

-- Rui Alberto L. Gon�alves <[EMAIL PROTECTED]> PT Inova��o


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



--
<A HREF="http://www.focalpoint.com/";>Home Page</A>
education is what's left after what is learned is forgotten.
                               -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
[EMAIL PROTECTED]             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                               (713) 215-1600 x 33#


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



Reply via email to