cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rui Alberto L." Gonçalves <rui-l-goncal...@ptinovacao.pt>
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
problem..so, 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="http://www.xmldb.org/xupdate">
      <xu:append select="/root-censorship" >
        <censorship datasource="{$star}">
           <xinclude:include  href="cocoon:/NEW_DATA_TO_BE_INSERTED"/>
        </censorship>
      </xu:append>
    </xu:modifications>
};

let $dburi := concat("xmldb:exist:///db/users/", $login,"/datasources"),
    $root := xmldb:collection($dburi, "admin", "")
return
   <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
 operations!

Any idea? Thanks to all.

Rui



-- 
Rui Alberto L. Gonçalves <rui-l-goncalves@ptinovacao.pt>
PT Inovação


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


Mime
View raw message