Dear All, To be able to create a soap-interface with support for the dynamic management of xml documents I created a XQuery module with some simple document management functions, which I stole from "pathfinder/runtime/xrpc/admin/admin.xq" (the code is found at the end of this mail). To test the functions without soap, I created tree simple xqueries. Now adding and displaying documents works perfectly. However, when I want to delete a document I get: "ERROR = !ERROR: _del_doc(tmp/test.xml): document not found in database (1 such errors)! !ERROR: interpret_params: shred_doc_base(param 1): evaluation error.". Maybe this is because the document is not shredded in an ordinary way, however I do not know of any other function that can insert documents without a physical location. If someone could help me to delete these documents, or point me to another way of inserting documents without a physical location (, or show me the stupid mistake I made :) ), this would be very much appreciated. Best regards, Arthur The module looks as follows: ========================== module namespace cq = "http://db.cs.utwente.nl/cq#"; declare updating function cq:PUT($uri as xs:string, $doc as element()) { if (substring($uri, 1,4) = 'tmp/') then put($doc, $uri) else error('PUT: only relative URIs starting with tmp/ allowed') }; declare function cq:GET($uri as xs:string) { doc($uri) }; declare document management function cq:DELETE($uri as xs:string) { if (substring($uri, 1,4) = 'tmp/') then pf:del-doc($uri) else error('DELETE: only relative URIs starting with tmp/ allowed') }; ========================== The three test files look as follows: ========================== import module namespace cq = "http://db.cs.utwente.nl/cq#" at "/home/db/bunninge/phd/implementation/xquery/try3_module/ca_module.xq"; cq:PUT("tmp/test.xml",<bla/>) ========================== import module namespace cq = "http://db.cs.utwente.nl/cq#" at "/home/db/bunninge/phd/implementation/xquery/try3_module/ca_module.xq"; cq:GET("tmp/test.xml") ========================== import module namespace cq = "http://db.cs.utwente.nl/cq#" at "/home/db/bunninge/phd/implementation/xquery/try3_module/ca_module.xq"; cq:DELETE("tmp/test.xml")