Hi Arve - that solves my problem! Thanks a lot Regards Simon
-----Ursprüngliche Nachricht----- Von: Arve Gengelbach [mailto:ag@basex.org] Gesendet: Mittwoch, 25. Juni 2014 22:42 An: Daum, Simon Cc: basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] StaticFunc expression: no updating expression allowed with db:add()
Hi, How about adding a %updating to the function's annotation:
declare %updating function cmd:adToDb(...) {...}
Hope this helps, Arve
On 25 Jun 2014, at 20:30, Daum, Simon simon.daum@tum.de wrote:
Hi there,
I have a question about the db:add() function if it is included in a xquery function which is installed as module in the repo.
As I set up this function in a module
declare function cms:addToDb($dbName as xs:string, $rootNodeAndFileName as xs:string, $content) { db:add($dbName, concat('<',$rootNodeAndFileName, '>', $content ,'</',$rootNodeAndFileName, '>'), concat($rootNodeAndFileName, ".xml")) };
And call it from the GUI app I get: [XUST0001] StaticFunc expression: no updating expression allowed.
The error code say something about granting permissions but also states that "Permissions are only relevant in the client/server architecture: the Standalone Mode and the GUI is run with admin permissions." Any tip from the BaseX'ers?
Regards Simon
Dipl.-Ing. Simon Daum Lehrstuhl für Computergestützte Modellierung und Simulation Technische Universität München Arcisstraße 21 D-80290 München
Tel: +49 89 289 25065 Fax: +49 89 289 25051 Web: www.cms.bv.tum.de
basex-talk@mailman.uni-konstanz.de