Hi Kendall,
csv:serialize(<csv><record><a>A</a></record></csv>, 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 into the difference between general and CSV serialization parameters.
Also, about the csv option in RESTXQ, I have a need to accept a variety of CSV formats, some day in the future. For examples, CSV might have left and right quote characters, instead of double quote characters, or one uses commas another uses semi-colons, etc. Do you have a suggestion about how to handle that and still use the csv input option?
The CSV module provides support for custom field separators, so switching from commas to semi-colons should be no problem [2]. Regarding left and quote characters, do you refer to “ and ” (201C / 201D) ? Do you have some more background information for us how these characters come into play in your scenario?
Thanks in advance, Christian
[1] http://docs.basex.org/wiki/Serialization [2] http://docs.basex.org/wiki/CSV_Module