formatStringSequence

This function formats a sequence of strings as a comma-separated list of SQL literals.

Syntax

composite:formatStringSequence ($values as node()*)

Example

declare variable $values := <a><b>1</b><b>2</b></a>;
<result>{composite:formatStringSequence ($values//b)}</result>

Result

The output is of the form xs:string:

<result>'1','2'</result>