It is common to export list of strings as double quote csv format in log file with Xquery for ML.
I wonder whether there is better way to do so from the list of the strings.
Currently I have to use a lot of fn:concat('"', $value , '"') block to do it.
It becomes difficult to read if there is a long list of values to process.
Below is the current code for a simple demo case.
xquery version "1.0-ml";
let $values := ('string 1', 'string 2', 'string N')
return fn:string-join( $values ! fn:concat('"', . , '"'), ',')
The expected output is "string 1","string 2","string N"