Re: [basex-talk] Serialization options

2017-11-30 Thread Christian Grün
Hi Kendall, > csv:serialize(A, map {'newline': > ''}) The 'newline' option is a general serialization option; it cannot be used with csv:serialize. If you want to take advantage of it, you should use fn:serialize with method:csv [1]. Maybe my previous response to George gives some more insight

Re: [basex-talk] Serialization options

2017-11-30 Thread Kendall Shaw
Hi, Before people post CSV files to a web service, they bring a troop of Guerillas into a room and give them computer keyboards. After that the guerillas pound on the keyboards and then click send. So, the CSV files that arrive can have different separators between each other and they use

Re: [basex-talk] Serialization options

2017-11-30 Thread Christian Grün
Hi Kendall, Good point ;) As left/right quote characters (and all the regional variants) could indeed be proper input, it’s difficult to define generic rules that work for all kind of data that is feeded into BaseX. I think the best solution is to first retrieve the (let’s call it) CSV data as

Re: [basex-talk] Serialization options

2017-11-30 Thread Kendall Shaw
Hi, Thank you, I will certainly use the newline option instead of what I described, I n the future. Related to that, am I getting syntax wrong here: csv:serialize(A, map {'newline': ''}) I get back unknown option ‘newline’. The same for item-separator and method. Also, about the csv option

Re: [basex-talk] Serialization options

2017-11-30 Thread Christian Grün
Hi Kendall, > That results in CRLF for me when served from RESTXQ. With RESTXQ, you could try the following: declare %output:method('csv') %output:newline('\r\n') function local:csv() { }; > “tems can also be serialized as JSON if the Serialization Parameter method is > set