StaticFunc expression: no updating expression allowed with db:add()

Thursday, 26 June 2014 · 1 message
DS
Daum, Simon26 Jun 2014 11:30 #
Hi Arve - that solves my problem! Thanks a lot Regards Simon
Quoted text · 46 lines
-----Ursprüngliche Nachricht----- Von: Arve Gengelbach [mailto:ag at basex.org] Gesendet: Mittwoch, 25. Juni 2014 22:42 An: Daum, Simon Cc: basex-talk at 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 at 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 > > - - - - - - - - -

⚡Generated with XQuery