You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrzej Jan Taramina <an...@chaeron.com> on 2003/10/17 02:20:11 UTC
Help: Dummies guide to Cocoon database inserts?
I've searched and read all the info on database usage on the main cocoon site
and the wiki, and am even more confused than when I started.
I have a pipeline that produces an XML document. Now I need to store that
document into a database table in a clob column, along with some other
fields. I have to use a standard relational DBMS, so XML dbms's are not a
solution for me.
I'm not using XSP so the ESQL logic sheet is not really something I want to
do.
Using the SQLTransformer would mean escaping a lot of special characters (eg.
quotes) to create the input the SQLTransformer would need, so that's a bit
ugly, and inserts/updates are not really the forte of the transfomer.
The modular database actions would seem to fit the bill....but the
documentation and examples on how they are used are very confusing.
Is there any better documentation on how to use these actions in a real world
situation, without using XSPs, where the data to be inserted as XML text in a
clob/blob column comes from a SAX event stream from a prior pipeline?
If someone could show me a simple "dummies" example that does this, I would
be very much in their debt!
Or are there any other custom database actions out there that are available
that would make this a bit easier to accomplish?
Thanks!
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Help: Dummies guide to Cocoon database inserts?
Posted by Andrzej Jan Taramina <an...@chaeron.com>.
Chris:
> You may use the XMLFileModule together with the actions to access any
> pipeline in Cocoon and store the result in a database column. To use the
> XMLFileModule follow the samples which show e.g. how to use the request
> attribute module instead of the default request parameter module.
The problem here is that I already have a pipeline that has produced an
output stream, and needed to get access to that output to include it in a
database. It is not feasible to call that original pipeline from the
XMLFileModule, since it is a Chiba XForms pipeline that has to be initiated
by a user form submission.
That being said, I've solved this issue for my project.
My solution was to enhance Chicoon (the Cocoon interface to Chiba XForms) so
that it can optionally store it's output in a DOM tree as a session attribute
along with streaming it out into the pipeline. Then I used the
JXPathMetaModule on top of the session-attr module to access the individual
elements of the output stream inside my database metadata definition for the
modular database actions. A bit tricky to figure out, but once I got it
working, it rocks!
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Help: Dummies guide to Cocoon database inserts?
Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Andrzej Jan Taramina wrote:
> The modular database actions would seem to fit the bill....but the
> documentation and examples on how they are used are very confusing.
You may use the XMLFileModule together with the actions to access any
pipeline in Cocoon and store the result in a database column. To use the
XMLFileModule follow the samples which show e.g. how to use the request
attribute module instead of the default request parameter module.
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org