Re: [basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Hondros, Constantine (ELS-AMS)
Ah, fantastic. Thank you Christian (and Martin). Yes, I was using an incorrect constructor for Arrays in this instance. Many thanks, Constantine -Original Message- From: Christian Grün [mailto:christian.gr...@gmail.com] Sent: 12 December 2017 13:41 To: Hondros, Constantine (ELS-AMS) Cc:

Re: [basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Christian Grün
This time I was too quick, sorry (I ignored the query prolog of your query). This is the fixed version: declare namespace output = 'http://www.w3.org/2010/xslt-xquery-serialization'; declare option output:method 'json'; declare variable $authors := Robert A Sand

Re: [basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Martin Honnen
On 12.12.2017 13:30, Hondros, Constantine (ELS-AMS) wrote: I was already kicking myself for rushing and not providing a SCE! Please see the code below, and thanks. declare option output:method 'json'; declare variable $authors :=         Robert A     Sanders           

Re: [basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Christian Grün
Thanks. Your query does not yield “Value has more than one item”, at least with the latest snapshot of BaseX. But maybe you are expecting another result? On Tue, Dec 12, 2017 at 1:30 PM, Hondros, Constantine (ELS-AMS) wrote: > Hi Christian, > > I was already kicking myself for rushing and not pr

Re: [basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Hondros, Constantine (ELS-AMS)
Hi Christian, I was already kicking myself for rushing and not providing a SCE! Please see the code below, and thanks. declare option output:method 'json'; declare variable $authors := Robert A Sanders Emily Chapel ; map {

Re: [basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Christian Grün
Hi Constantine, > (: just assume $authors is populated ...:) Could you provide us with a little self-contained example? Because there are all kinds of populations out there. TIA as well, Christian

[basex-talk] XQuery 3.1/Build array of maps dynamically

2017-12-12 Thread Hondros, Constantine (ELS-AMS)
Hello all, I want to dynamically build a map where the value is an array of maps. I am having a problem with the syntax. (My use-case is to deliver this as JSON for simple ingestion to Spark, by the way). Here's my test code, which translates cleanly into JSON: declare option output:method 'js

Re: [basex-talk] bat problem with latest builds v9

2017-12-12 Thread Christian Grün
An addendum: In BaseX 9.0, we will now keep the refactored 8.x functions enabled. This includes e.g. xquery:update and some functions that will be moved to a new work-in-progress Update Module [1]. The functions will probably be removed with BaseX 9.1. [1] http://docs.basex.org/wiki/Update_Module