- From: Christian Grün <christian.gruen@gmail.com>
- Date: Thu, 26 Mar 2015 11:27:03 +0100
- To: EXPath <expath@googlegroups.com>
- Cc: EXPath <public-expath@w3.org>
Hi Adam, Thanks for your feedback. > Maps are defined as functions, so why not just use functions for this > to create an ordered map? Or just place k->v functions into an array? I can't figure out yet how this would look like. Could you give a small example? This was the map syntax we wanted to use: mongo:command($id, 'db', map { "createIndexes": "coll", "indexes": "..." }) The string fallback would look like this: mongo:command($id, 'db', '{ "createIndexes": "coll", "indexes": "..." }') Best, Christian On Thu, Mar 26, 2015 at 10:36 AM, Adam Retter <adam.retter@googlemail.com> wrote: > > On 25 March 2015 at 23:38, Christian Grün <christian.gruen@gmail.com> wrote: >> Dear EXPath followers, >> >> Thanks for the feedback on our MongoDB module [1]! The general >> reactions on the current working draft were all positive, but we >> stumbled upon a potential show stopper: >> >> In our module, we initially decided to use XQuery maps and arrays for >> representing JSON structures. Unfortunately, it turned out there are >> at least some MongoDB functions – such as mongo:command – that require >> map entries to be ordered (!). However, map entries in XQuery have no >> order, which means that we need to rethink our current design. We >> currently see the following alternatives: >> >> 1. Use JSON strings, as proposed in Dannes' initial Mongrel implementation, >> 2. Use XML representations of JSON structures, such as the one >> generated via fn:json-to-xml, >> 3. Ensure order of map entries by wrapping them in additional >> sequences or arrays. >> >> We are currently trying to find out which fallback causes least >> headache, but we are also interested in your thoughts. Let us know >> what you think! >> >> Christian >> >> [1] http://expath.org/spec/mongo >> >> -- >> You received this message because you are subscribed to the Google Groups "EXPath" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to expath+unsubscribe@googlegroups.com. >> To post to this group, send email to expath@googlegroups.com. >> Visit this group at http://groups.google.com/group/expath. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > Adam Retter > > skype: adam.retter > tweet: adamretter > http://www.adamretter.org.uk > > -- > You received this message because you are subscribed to the Google Groups "EXPath" group. > To unsubscribe from this group and stop receiving emails from it, send an email to expath+unsubscribe@googlegroups.com. > To post to this group, send email to expath@googlegroups.com. > Visit this group at http://groups.google.com/group/expath. > For more options, visit https://groups.google.com/d/optout.
Received on Thursday, 26 March 2015 10:27:57 UTC