You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2007/03/01 17:16:18 UTC

Re: access eXist Db from Cocoon with XQueryTransformer

thomason a écrit :
> on 2/27/07 9:59 AM, Sébastien Geindre at sebastien.geindre@meteo.fr wrote:
>   
>> i need to execute a xquery on the eXist cocoon embedded database, in a
>> cocoon pipe.
>>     
>
>   
Thanks for your answer, but in your case, your db is external, so REST 
maybe the right way.

in mine, the db is embedded in cocoon, and the xquery are more 
complicated (call to external function in java using JTS...) and the 
xqueries needs parameters setted in the xml post...
That's why i need a xqueryTransformer...
> e.g., from one of my apps (all on one line, gasp):
> <map:generate 
> src="http://{global:db-server}/rest/{global:offering-collection}/{1}.xml?_ho
> wmany=-1&amp;_query=declare namespace
> util='http://exist-db.org/xquery/util'; declare namespace
> xmldb='http://exist-db.org/xquery/xmldb'; for $item in //Term return
> (xmldb:last-modified('/db/offerings',
> util:document-name($item)),/Root/ProgramName, $item)" />
>
> Also,
> <map:generate 
> src="http://{global:db-server}/rest/{global:program-collection}?_howmany=-1&
> amp;_query=/Root/ProgramName|/Root/ProgramAbbrev|/Root/ProgramDescription|//
> Number|//Title|//Status|//Director/DName" />
>
> Note that I run eXist as a separate app, rather than embedded, for
> independent upgrades of cocoon and eXist.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




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


Re: access eXist Db from Cocoon with XQueryTransformer

Posted by thomason <th...@physio1.utmem.edu>.
on 3/2/07 6:52 AM, Sébastien Geindre at sebastien.geindre@meteo.fr wrote:
> a custon generator is a better solution than use the XQueryTransformer +
> eXist module extension on JTS api ?

Don't know (the particulars of your application for quick proof-of-concept
vs. production performance). I suspect the depth of your research into the
problem makes you the authority in this area. Sorry not to be of more help!
Don



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


Re: access eXist Db from Cocoon with XQueryTransformer

Posted by Sébastien Geindre <se...@meteo.fr>.
Donald Thomason a écrit :
> On Fri, 02 Mar 2007 10:27:43 +0100
>  Sébastien Geindre <se...@meteo.fr> wrote:
>   
>> At first, i intend to use JTS in XQuery function which
>> could call java function, implemented with the JTS API.
>> But performance could be a problem...
>>
>> In fact i'd like to do spatial query on XML database....
>> Cocoon handles XML post request, then requests the eXists
>> database by XQuery (extension with API JTS), and then
>> format the XML return...
>>
>> Any opinion about kind of architecture ??
>>     
>
> Sébastien,
>    I have not explored such a model before, so I can't be
> of more help. A custom generator may be an option, as well,
> though I know you were looking for a quick solution.
> Love to hear about your ultimate solution.
> Don 
>
>   
a custon generator is a better solution than use the XQueryTransformer + 
eXist module extension on JTS api ?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




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


Re: access eXist Db from Cocoon with XQueryTransformer

Posted by Donald Thomason <th...@physio1.utmem.edu>.
On Fri, 02 Mar 2007 10:27:43 +0100
 Sébastien Geindre <se...@meteo.fr> wrote:
>At first, i intend to use JTS in XQuery function which
>could call java function, implemented with the JTS API.
>But performance could be a problem...
>
>In fact i'd like to do spatial query on XML database....
>Cocoon handles XML post request, then requests the eXists
>database by XQuery (extension with API JTS), and then
>format the XML return...
>
>Any opinion about kind of architecture ??

Sébastien,
   I have not explored such a model before, so I can't be
of more help. A custom generator may be an option, as well,
though I know you were looking for a quick solution.
Love to hear about your ultimate solution.
Don 

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


Re: access eXist Db from Cocoon with XQueryTransformer

Posted by Sébastien Geindre <se...@meteo.fr>.
> Sorry for misunderstanding. The XQueryTransformer code was posted by Ben
> Anderson 
> <http://www.mail-archive.com/users@cocoon.apache.org/msg24913.html>.
>   
Thanks, i am already on it...
> The xml in the POST is no problem, but the JTS suggests the possibility of a
> flow solution (with the org.xmldb.api.DatabaseManager and
> org.xmldb.api.base.Collection interfaces).
>   

At first, i intend to use JTS in XQuery function which could call java 
function, implemented with the JTS API.
But performance could be a problem...

In fact i'd like to do spatial query on XML database....
Cocoon handles XML post request, then requests the eXists database by 
XQuery (extension with API JTS), and then format the XML return...

Any opinion about kind of architecture ??
(It is just a proof of concept, not intended to be on production...)

-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




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


Re: access eXist Db from Cocoon with XQueryTransformer

Posted by thomason <th...@physio1.utmem.edu>.
on 3/1/07 10:16 AM, Sébastien Geindre at sebastien.geindre@meteo.fr wrote:
> thomason a écrit :
>> on 2/27/07 9:59 AM, Sébastien Geindre at sebastien.geindre@meteo.fr wrote:
>>   
>>> i need to execute a xquery on the eXist cocoon embedded database, in a
>>> cocoon pipe.
>>>     
>> 
>>   
> Thanks for your answer, but in your case, your db is external, so REST
> maybe the right way.
> 
> in mine, the db is embedded in cocoon, and the xquery are more
> complicated (call to external function in java using JTS...) and the
> xqueries needs parameters setted in the xml post...
> That's why i need a xqueryTransformer...

Sorry for misunderstanding. The XQueryTransformer code was posted by Ben
Anderson 
<http://www.mail-archive.com/users@cocoon.apache.org/msg24913.html>.

The xml in the POST is no problem, but the JTS suggests the possibility of a
flow solution (with the org.xmldb.api.DatabaseManager and
org.xmldb.api.base.Collection interfaces).

Don



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