Hi,
when I try to register jobs:eval as a service, BaseX 9.2 says: "no variables allowed".
Is it not possible to register a service with a variable?
Not working:
jobs:eval("declare variable $xml external; $xml", map { 'xml': 'XML' }, map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': true() })
working:
jobs:eval("declare variable $xml external; $xml", map { 'xml': 'XML' }, map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': false() })
http://docs.basex.org/wiki/Jobs_Module#jobs:eval
Thanks, Daniel
Hi Daniel,
no variables can be bound if services are registered, that’s true (values that are bound to variables might potentially be huge, and blow up the initial startup time of BaseX). I have added a comment to our documentation.
Best, Christian
On Wed, Apr 3, 2019 at 11:57 AM Zimmel, Daniel D.Zimmel@esvmedien.de wrote:
Hi,
when I try to register jobs:eval as a service, BaseX 9.2 says: "no variables allowed".
Is it not possible to register a service with a variable?
Not working:
jobs:eval("declare variable $xml external; $xml", map { 'xml': 'XML' }, map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': true() })
working:
jobs:eval("declare variable $xml external; $xml", map { 'xml': 'XML' }, map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': false() })
http://docs.basex.org/wiki/Jobs_Module#jobs:eval
Thanks, Daniel
Thanks for the clarification. This sound like a wise thing to do.
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Mittwoch, 3. April 2019 13:18 An: Zimmel, Daniel Cc: BaseX Betreff: Re: [basex-talk] jobs:eval as a service, "no variables allowed"
Hi Daniel,
no variables can be bound if services are registered, that’s true (values that are bound to variables might potentially be huge, and blow up the initial startup time of BaseX). I have added a comment to our documentation.
Best, Christian
On Wed, Apr 3, 2019 at 11:57 AM Zimmel, Daniel D.Zimmel@esvmedien.de wrote:
Hi,
when I try to register jobs:eval as a service, BaseX 9.2 says: "no variables
allowed".
Is it not possible to register a service with a variable?
Not working:
jobs:eval("declare variable $xml external; $xml", map { 'xml': 'XML' }, map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': true() })
working:
jobs:eval("declare variable $xml external; $xml", map { 'xml': 'XML' }, map { 'id':'TEST', 'start':'11:31:50', 'interval':'P1D', 'service': false() })
http://docs.basex.org/wiki/Jobs_Module#jobs:eval
Thanks, Daniel
basex-talk@mailman.uni-konstanz.de