Re: [basex-talk] Two questions on use of the serialize function and character maps

2019-04-02 Thread Martin Honnen
On 02.04.2019 22:37, Christian Grün wrote: What's your view of adaptive serialization of map(xs:string,xs:string) and a character map, should the character map be applied to the map's key and value string values? My general view on the adaptive serialization method is that I would have loved i

Re: [basex-talk] Two questions on use of the serialize function and character maps

2019-04-02 Thread Christian Grün
> Are there plans to remove the restrictions on string arguments? > It is hard writing standard XQuery 3.1 when one implementation (BaseX) > wants >map { 'indent' : 'yes' } > and another like Saxon >map { 'indent' : true() } Yes, I guess so. The choices that have been made for the data typ

Re: [basex-talk] Two questions on use of the serialize function and character maps

2019-04-02 Thread Martin Honnen
Hi Christian, On 02.04.2019 14:36, Christian Grün wrote: 1) Is there any way to provide the "use-character-maps" parameter supplied the XPath 3.1 way with a second argument to "serialize" as a map: serialize("a,b", map { 'method' : 'text', 'use-character-maps' : map { "'" : "'" }})

Re: [basex-talk] Two questions on use of the serialize function and character maps

2019-04-02 Thread Christian Grün
Hi Martin, > 1) Is there any way to provide the "use-character-maps" parameter > supplied the XPath 3.1 way with a second argument to "serialize" as a map: > serialize("a,b", map { 'method' : 'text', 'use-character-maps' : > map { "'" : "'" }}) In BaseX, values of the fn:serialize map

Re: [basex-talk] Hitting the Tail Recursion wall

2019-04-02 Thread Marco Lettere
If you need to join the resulting strings just use well ... string-join ... declare function local:topath($path){   let $pathseg := tokenize($path, "/")   let $pathsequence :=     fold-left($pathseg, (), function($out, $segment){   if($segment = "." or $segment = "") then $out   els