cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rui Alberto L." Gonçalves <>
Subject updating documents problems - eXist and cocoon
Date Tue, 13 Jul 2004 19:46:07 GMT
Hi all,

I've passed two days trying to figure out a solution to my, I'm posting this message in the hope that someone
here could come up with an idea...

I'm using cocoon+eXist and using XQueryGenerator to perform
all the required operations in the database.

The problem is:
I need perform an XUpdate in a document in the database, but 
the new data to be inserted in the document is returned by a 
cocoon pipeline. 

The XQuery script to XQueryGenerator that I would like to have:
xquery version "1.0";

declare variable $xupdate {
<xu:modifications version="1.0" xmlns:xu="">
      <xu:append select="/root-censorship" >
        <censorship datasource="{$star}">
           <xinclude:include  href="cocoon:/NEW_DATA_TO_BE_INSERTED"/>

let $dburi := concat("xmldb:exist:///db/users/", $login,"/datasources"),
    $root := xmldb:collection($dburi, "admin", "")
   <result>{xmldb:update($root, $xupdate)} modifications </result>

1) XQueryGenerator doesn't resolve xinclude before execute, so this 
approach doesn't work.

2) I can't produce  the script XQuery dynamically in a cocoon 
pipeline, because XQuery script is not XML. Otherwise I could do
something like:
<map:generate type="xquery" src="cocoon:/generate_xquery_script"/>

3) Cocoon XMLDBTransformer doesn't work with exist. The XMLDBTransformer
that is shipped with exist only allows to perform select type

Any idea? Thanks to all.


Rui Alberto L. Gonçalves <>
PT Inovação

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message