Mechanism to serialize maps in output?
Howdy -- Right now, trying to inspect a map (ie. returning one from a query) results in FOTY0012. This is unfortunate from the perspective of allowing users to examine the objects their logic creates. Has thought been given to defining a serialization-friendly way of representing maps, perhaps as XML entities under their own namespace?
Hi Charles, I wrote a small script for myself, together with Leo from our team, to serialize maps directly from XQuery. https://gist.github.com/3f2731c1211f7188664c It might not cover each corner-case but is still quite handy. Hope this helps a little, in the meantime we will investigate whether we will provide an integrated function. Hope this helps :-) Michael Am 27.03.2012 um 02:05 schrieb Charles Duffy:
Howdy --
Right now, trying to inspect a map (ie. returning one from a query) results in FOTY0012. This is unfortunate from the perspective of allowing users to examine the objects their logic creates. Has thought been given to defining a serialization-friendly way of representing maps, perhaps as XML entities under their own namespace?
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Am 27.03.2012 um 02:05 schrieb Charles Duffy:
Howdy --
Right now, trying to inspect a map (ie. returning one from a query) results in FOTY0012. This is unfortunate from the perspective of allowing users to examine the objects their logic creates. Has thought been given to defining a serialization-friendly way of representing maps, perhaps as XML entities under their own namespace?
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hello, perhaps it is also worthwhile to check how MarkLogic serializes maps. Kind regards, Hans-Juergen Rennau PS: Here comes an example (representing a map containing map): <map:map xmlns:map="http://marklogic.com/xdmp/map"> <map:entry key="GlobalDates"> <map:value xsi:type="map:map"> <map:map> <map:entry key="Booking"> <map:value xsi:type="xs:date">2012-03-22</map:value> </map:entry> <map:entry key="Duration"> <map:value xsi:type="xs:integer">7</map:value> </map:entry> <map:entry key="CheckIn"> <map:value xsi:type="xs:date">2012-06-04</map:value> </map:entry> <map:entry key="CheckOut"> <map:value xsi:type="xs:date">2012-06-11</map:value> </map:entry> </map:map> </map:value> </map:entry> </map:map> ________________________________ Von: Charles Duffy <charles@dyfis.net> An: basex-talk@mailman.uni-konstanz.de Gesendet: 2:05 Dienstag, 27.März 2012 Betreff: [basex-talk] Mechanism to serialize maps in output? Howdy -- Right now, trying to inspect a map (ie. returning one from a query) results in FOTY0012. This is unfortunate from the perspective of allowing users to examine the objects their logic creates. Has thought been given to defining a serialization-friendly way of representing maps, perhaps as XML entities under their own namespace?
Hi Charles, and thanks Hans-Jürgen, I've added a GitHub issue to avoid that this is getting lost: https://github.com/BaseXdb/basex/issues/448 Christian ___________________________ On Tue, Mar 27, 2012 at 2:48 PM, Hans-Juergen Rennau <hrennau@yahoo.de> wrote:
Hello,
perhaps it is also worthwhile to check how MarkLogic serializes maps.
Kind regards, Hans-Juergen Rennau
PS: Here comes an example (representing a map containing map): <map:map xmlns:map="http://marklogic.com/xdmp/map"> <map:entry key="GlobalDates"> <map:value xsi:type="map:map"> <map:map> <map:entry key="Booking"> <map:value xsi:type="xs:date">2012-03-22</map:value> </map:entry> <map:entry key="Duration"> <map:value xsi:type="xs:integer">7</map:value> </map:entry> <map:entry key="CheckIn"> <map:value xsi:type="xs:date">2012-06-04</map:value> </map:entry> <map:entry key="CheckOut"> <map:value xsi:type="xs:date">2012-06-11</map:value> </map:entry> </map:map> </map:value> </map:entry> </map:map>
________________________________ Von: Charles Duffy <charles@dyfis.net> An: basex-talk@mailman.uni-konstanz.de Gesendet: 2:05 Dienstag, 27.März 2012 Betreff: [basex-talk] Mechanism to serialize maps in output?
Howdy --
Right now, trying to inspect a map (ie. returning one from a query) results in FOTY0012. This is unfortunate from the perspective of allowing users to examine the objects their logic creates. Has thought been given to defining a serialization-friendly way of representing maps, perhaps as XML entities under their own namespace?
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
participants (4)
-
Charles Duffy -
Christian Grün -
Hans-Juergen Rennau -
Michael Seiferle