You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jonas Höglund <jo...@swatdesign.com> on 2005/06/07 13:51:39 UTC
Storing a xml document uploaded through xmlHttpRequest to a database
Hi!
Can anyone help me to explain how to store/save a xml document (the
request body) send to the server as a xmlHttpRequest to a field in a
database. I've been able to process the xmlHttpRequest request through
the stream generator and saving data from nodes in the xml document
through xslt transformation and esql logicsheet, but what I realy want
is to store the complet xml document to the database. I've been playing
araound with modulare database action, but have not found a solution to
my problem. Is it possible, and if so, how? BTW, I don't know any Java,
so writing a custom component is not a option to me.
Tnx,
/jonas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Storing a xml document uploaded through xmlHttpRequest to a database
Posted by Jonas Höglund <jo...@swatdesign.com>.
Hmmm...
It's stated, somewhere in the docs, that the modular database action (an
action) is the prefered way of inserting/updating/deleting data in to a
database and esql was prefered for reading from a database. I could use
esql using a dynamic xsp page, but I would prefer to store the xml
documen directly from the request stream without any transformation or
serialization to it, for performance reasons mainly, and simpleness
secondly.
I thought the modular database action (an action) was the only way of
storing binary data to a database. Is there other ways?
/jonas
Geert Josten wrote:
> Hi,
>
> SQLTransformer is part of the databases block I believe. But if you
> prefer esql (which is part of XSP I believe), than stream the XML,
> wrap it in ESQL statements with some XSL sheet and than get that
> executed as an (dynamically generated) XSP...
>
> Anyhow, I don't think you will be able to let any action influence the
> current data stream. That is not what actions are intended for.
> Actions are intended for side effects. Logging in, creating a session,
> logging info, etc. You will have to use a transformer or generator for
> this, I'm afraid.
>
> (correct me if I'm wrong, anyone)
>
> Cheers,
> Geert
>
> Jonas Höglund wrote:
>
>> I thought the SQL Transformer was deprected, and the modular database
>> action was the preferd way of inserting/updating data in a database.
>> I would prefer sticking to the modular database action over using yet
>> another way of calling the database.
>>
>> /jonas
>>
>> Geert Josten wrote:
>>
>>> I believe there is an SQL Transformer around somewhere. Is it
>>> possible to wrap the XML data into an xml sql statement (of the
>>> transformers namespace) and putting that through the transformer?
>>>
>>> HTH,
>>> Geert
>>>
>>> Jonas Hvglund wrote:
>>>
>>>> Hi!
>>>>
>>>> Can anyone help me to explain how to store/save a xml document (the
>>>> request body) send to the server as a xmlHttpRequest to a field in
>>>> a database. I've been able to process the xmlHttpRequest request
>>>> through the stream generator and saving data from nodes in the xml
>>>> document through xslt transformation and esql logicsheet, but what
>>>> I realy want is to store the complet xml document to the database.
>>>> I've been playing araound with modulare database action, but have
>>>> not found a solution to my problem. Is it possible, and if so, how?
>>>> BTW, I don't know any Java, so writing a custom component is not a
>>>> option to me.
>>>>
>>>> Tnx,
>>>> /jonas
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Storing a xml document uploaded through xmlHttpRequest to a database
Posted by Geert Josten <Ge...@daidalos.nl>.
Hi,
SQLTransformer is part of the databases block I believe. But if you prefer esql (which is part of
XSP I believe), than stream the XML, wrap it in ESQL statements with some XSL sheet and than get
that executed as an (dynamically generated) XSP...
Anyhow, I don't think you will be able to let any action influence the current data stream. That is
not what actions are intended for. Actions are intended for side effects. Logging in, creating a
session, logging info, etc. You will have to use a transformer or generator for this, I'm afraid.
(correct me if I'm wrong, anyone)
Cheers,
Geert
Jonas Höglund wrote:
> I thought the SQL Transformer was deprected, and the modular database
> action was the preferd way of inserting/updating data in a database. I
> would prefer sticking to the modular database action over using yet
> another way of calling the database.
>
> /jonas
>
> Geert Josten wrote:
>
>> I believe there is an SQL Transformer around somewhere. Is it possible
>> to wrap the XML data into an xml sql statement (of the transformers
>> namespace) and putting that through the transformer?
>>
>> HTH,
>> Geert
>>
>> Jonas Hvglund wrote:
>>
>>> Hi!
>>>
>>> Can anyone help me to explain how to store/save a xml document (the
>>> request body) send to the server as a xmlHttpRequest to a field in a
>>> database. I've been able to process the xmlHttpRequest request
>>> through the stream generator and saving data from nodes in the xml
>>> document through xslt transformation and esql logicsheet, but what I
>>> realy want is to store the complet xml document to the database. I've
>>> been playing araound with modulare database action, but have not
>>> found a solution to my problem. Is it possible, and if so, how? BTW,
>>> I don't know any Java, so writing a custom component is not a option
>>> to me.
>>>
>>> Tnx,
>>> /jonas
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
--
=====================================
NB: het Daidalos kantoor is sinds 22 april
jl. gevestigd op een nieuw adres:
Daidalos BV
Hoekeindsehof 1 - 4
2665 JZ Bleiswijk
tel: +31 (0)10 850 12 00
fax: +31 (0)10 850 11 99
Bovenstaand adres is tevens het postadres.
======================
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV
http://www.daidalos.nl/
GPG: 1024D/12DEBB50
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Storing a xml document uploaded through xmlHttpRequest to a database
Posted by Jonas Höglund <jo...@swatdesign.com>.
I thought the SQL Transformer was deprected, and the modular database
action was the preferd way of inserting/updating data in a database. I
would prefer sticking to the modular database action over using yet
another way of calling the database.
/jonas
Geert Josten wrote:
> I believe there is an SQL Transformer around somewhere. Is it possible
> to wrap the XML data into an xml sql statement (of the transformers
> namespace) and putting that through the transformer?
>
> HTH,
> Geert
>
> Jonas Höglund wrote:
>
>> Hi!
>>
>> Can anyone help me to explain how to store/save a xml document (the
>> request body) send to the server as a xmlHttpRequest to a field in a
>> database. I've been able to process the xmlHttpRequest request
>> through the stream generator and saving data from nodes in the xml
>> document through xslt transformation and esql logicsheet, but what I
>> realy want is to store the complet xml document to the database. I've
>> been playing araound with modulare database action, but have not
>> found a solution to my problem. Is it possible, and if so, how? BTW,
>> I don't know any Java, so writing a custom component is not a option
>> to me.
>>
>> Tnx,
>> /jonas
>>
>>
>> ---------------------------------------------------------------------
>> 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: Storing a xml document uploaded through xmlHttpRequest to a database
Posted by Geert Josten <Ge...@daidalos.nl>.
I believe there is an SQL Transformer around somewhere. Is it possible to wrap the XML data into an
xml sql statement (of the transformers namespace) and putting that through the transformer?
HTH,
Geert
Jonas Höglund wrote:
> Hi!
>
> Can anyone help me to explain how to store/save a xml document (the
> request body) send to the server as a xmlHttpRequest to a field in a
> database. I've been able to process the xmlHttpRequest request through
> the stream generator and saving data from nodes in the xml document
> through xslt transformation and esql logicsheet, but what I realy want
> is to store the complet xml document to the database. I've been playing
> araound with modulare database action, but have not found a solution to
> my problem. Is it possible, and if so, how? BTW, I don't know any Java,
> so writing a custom component is not a option to me.
>
> Tnx,
> /jonas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
=====================================
NB: het Daidalos kantoor is sinds 22 april
jl. gevestigd op een nieuw adres:
Daidalos BV
Hoekeindsehof 1 - 4
2665 JZ Bleiswijk
tel: +31 (0)10 850 12 00
fax: +31 (0)10 850 11 99
Bovenstaand adres is tevens het postadres.
======================
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV
http://www.daidalos.nl/
GPG: 1024D/12DEBB50
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org