You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mathias Reem <m....@gmx.net> on 2009/01/06 14:42:03 UTC

Using cocoon pipeline for import

Hi

I've got to fetch some XML data from an external webserver, preprocess 
it - using XSLT - and store the result in our database. At the moment 
this is done by a shellscript.

As this shall now be integrated to our application, I was wandering if 
using a cocoon pipeline for this task would be feasible, or a really bad 
idea? As far as I can see. I would only have to write my own Serializer, 
which instead of writing stuff to an OutputStream would commit the data 
to the database.

Any comment is welcome.
	Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Using cocoon pipeline for import

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Hi Mathias, 

> -----Original Message-----
> From: Mathias Reem [mailto:m.reem@gmx.net] 
> Sent: dinsdag 6 januari 2009 23:10
> To: users@cocoon.apache.org
> Subject: Re: Using cocoon pipeline for import
> 
> Hi Jasha
> 
> > you won't have to write your own serializer but you can use the 
> > SQLtransformer.
> 
> Thx. I had seen the SQLtransformer but thought, that it's 
> intended to add data (from a DB) to a XML document. And 
> doesn't each "match-block" 
> in a pipeline need a sink (Serializer), for all the SAX 
> Events. As this transformer would consume all events, I 
> thought that would lead to errors.
> 
> I'm totally new to Cocoon, so sorry if I write bullshit.

No you're right, you still need some serializer to end the pipeline but
you can use the xml serializer to see the (XML) result of the SQL
transformation.

Regards,


Jasha Joachimsthal 
 
j.joachimsthal@onehippo.com - jasha@apache.org
 
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-5100 +1 (707) 773-4646


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Using cocoon pipeline for import

Posted by Mathias Reem <m....@gmx.net>.
Hi Jasha

> you won't have to write your own serializer but you can use the
> SQLtransformer.

Thx. I had seen the SQLtransformer but thought, that it's intended to 
add data (from a DB) to a XML document. And doesn't each "match-block" 
in a pipeline need a sink (Serializer), for all the SAX Events. As this 
transformer would consume all events, I thought that would lead to errors.

I'm totally new to Cocoon, so sorry if I write bullshit.

cu
	Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Using cocoon pipeline for import

Posted by Tak-po Li <ta...@gmail.com>.
Hi Jasha,

Thanks for the information.  In my application, xml could be 20 level in
depth.  The database has many-to-many relations.  I wonder whether this
reaches the limitation of SQLTransformer.

I understand the licenses of JPOX and Hibernate are different.  Besides
that, what is their strength and weakness?  Thanks,

Tak



On Wed, Jan 7, 2009 at 3:19 AM, Jasha Joachimsthal <
j.joachimsthal@onehippo.com> wrote:

>  Hi Tak,
>
> it depends on your project. The SQLTransformer is the easiest to use but
> you're bound to the specific SQL dialect of the query you're writing and you
> have to think more about stuff like SQL injection. You can use Hibernate or
> JPOX to make your queries work on multiple database flavours and get safer
> querying but that takes more time for the setup of your project.
>
> Regards,
>
>
> Jasha Joachimsthal
>
>  j.joachimsthal@onehippo.com - jasha@apache.org
>
> www.onehippo.com
> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
> San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-5100
> +1 (707) 773-4646
>
>  ------------------------------
> *From:* Tak-po Li [mailto:takpo.li@gmail.com]
> *Sent:* woensdag 7 januari 2009 3:44
> *To:* users@cocoon.apache.org
> *Subject:* Re: Using cocoon pipeline for import
>
>
> Hi Jasha,
>
> If I am interested in xml-relational mapping only, should
> I use SQLtransformer or Hibernate?  Thanks,
>
> Tak
>
>
>
>
>
> On Tue, Jan 6, 2009 at 9:12 AM, Jasha Joachimsthal <
> j.joachimsthal@onehippo.com> wrote:
>
>> Mathias,
>>
>> you won't have to write your own serializer but you can use the
>> SQLtransformer [1].
>>
>> [1] http://cocoon.apache.org/2.1/userdocs/sql-transformer.html
>>
>> Jasha
>>
>>
>> -----Oorspronkelijk bericht-----
>> Van: Mathias Reem [mailto:m.reem@gmx.net]
>> Verzonden: di 6-1-2009 14:42
>> Aan: users@cocoon.apache.org
>> Onderwerp: Using cocoon pipeline for import
>>
>> Hi
>>
>> I've got to fetch some XML data from an external webserver, preprocess
>> it - using XSLT - and store the result in our database. At the moment
>> this is done by a shellscript.
>>
>> As this shall now be integrated to our application, I was wandering if
>> using a cocoon pipeline for this task would be feasible, or a really bad
>> idea? As far as I can see. I would only have to write my own Serializer,
>> which instead of writing stuff to an OutputStream would commit the data
>> to the database.
>>
>> Any comment is welcome.
>>        Mathias
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>

RE: Using cocoon pipeline for import

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Hi Tak,
 
it depends on your project. The SQLTransformer is the easiest to use but
you're bound to the specific SQL dialect of the query you're writing and
you have to think more about stuff like SQL injection. You can use
Hibernate or JPOX to make your queries work on multiple database
flavours and get safer querying but that takes more time for the setup
of your project.
 
Regards,
 

Jasha Joachimsthal 
 
j.joachimsthal@onehippo.com - jasha@apache.org
 
www.onehippo.com <http://www.onehippo.com/> 
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-5100 +1 (707) 773-4646



________________________________

	From: Tak-po Li [mailto:takpo.li@gmail.com] 
	Sent: woensdag 7 januari 2009 3:44
	To: users@cocoon.apache.org
	Subject: Re: Using cocoon pipeline for import
	
	
	 
	Hi Jasha,
	 
	If I am interested in xml-relational mapping only, should I use
SQLtransformer or Hibernate?  Thanks,
	 
	Tak
	 
	 


	 
	On Tue, Jan 6, 2009 at 9:12 AM, Jasha Joachimsthal
<j....@onehippo.com> wrote:
	

		Mathias,
		
		you won't have to write your own serializer but you can
use the SQLtransformer [1].
		
		[1]
http://cocoon.apache.org/2.1/userdocs/sql-transformer.html
		
		Jasha
		
		
		-----Oorspronkelijk bericht-----
		Van: Mathias Reem [mailto:m.reem@gmx.net]
		Verzonden: di 6-1-2009 14:42
		Aan: users@cocoon.apache.org
		Onderwerp: Using cocoon pipeline for import
		

		Hi
		
		I've got to fetch some XML data from an external
webserver, preprocess
		it - using XSLT - and store the result in our database.
At the moment
		this is done by a shellscript.
		
		As this shall now be integrated to our application, I
was wandering if
		using a cocoon pipeline for this task would be feasible,
or a really bad
		idea? As far as I can see. I would only have to write my
own Serializer,
		which instead of writing stuff to an OutputStream would
commit the data
		to the database.
		
		Any comment is welcome.
		       Mathias
		
	
---------------------------------------------------------------------
		To unsubscribe, e-mail:
users-unsubscribe@cocoon.apache.org
		For additional commands, e-mail:
users-help@cocoon.apache.org
		
		
		

	
---------------------------------------------------------------------
		To unsubscribe, e-mail:
users-unsubscribe@cocoon.apache.org
		For additional commands, e-mail:
users-help@cocoon.apache.org
		



Re: Using cocoon pipeline for import

Posted by Tak-po Li <ta...@gmail.com>.
Hi Jasha,

If I am interested in xml-relational mapping only, should
I use SQLtransformer or Hibernate?  Thanks,

Tak





On Tue, Jan 6, 2009 at 9:12 AM, Jasha Joachimsthal <
j.joachimsthal@onehippo.com> wrote:

> Mathias,
>
> you won't have to write your own serializer but you can use the
> SQLtransformer [1].
>
> [1] http://cocoon.apache.org/2.1/userdocs/sql-transformer.html
>
> Jasha
>
>
> -----Oorspronkelijk bericht-----
> Van: Mathias Reem [mailto:m.reem@gmx.net]
> Verzonden: di 6-1-2009 14:42
> Aan: users@cocoon.apache.org
> Onderwerp: Using cocoon pipeline for import
>
> Hi
>
> I've got to fetch some XML data from an external webserver, preprocess
> it - using XSLT - and store the result in our database. At the moment
> this is done by a shellscript.
>
> As this shall now be integrated to our application, I was wandering if
> using a cocoon pipeline for this task would be feasible, or a really bad
> idea? As far as I can see. I would only have to write my own Serializer,
> which instead of writing stuff to an OutputStream would commit the data
> to the database.
>
> Any comment is welcome.
>        Mathias
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>

RE: Using cocoon pipeline for import

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Mathias,

you won't have to write your own serializer but you can use the SQLtransformer [1].

[1] http://cocoon.apache.org/2.1/userdocs/sql-transformer.html

Jasha


-----Oorspronkelijk bericht-----
Van: Mathias Reem [mailto:m.reem@gmx.net]
Verzonden: di 6-1-2009 14:42
Aan: users@cocoon.apache.org
Onderwerp: Using cocoon pipeline for import
 
Hi

I've got to fetch some XML data from an external webserver, preprocess 
it - using XSLT - and store the result in our database. At the moment 
this is done by a shellscript.

As this shall now be integrated to our application, I was wandering if 
using a cocoon pipeline for this task would be feasible, or a really bad 
idea? As far as I can see. I would only have to write my own Serializer, 
which instead of writing stuff to an OutputStream would commit the data 
to the database.

Any comment is welcome.
	Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org