title: XQuery - concat with same first value
body: <p>I have a collection of files describing magazines content</p>
  
  <pre><code>&lt;magazine&gt;
  &lt;issue.number&gt;22&lt;/issue.number&gt;
   &lt;article&gt;
  &lt;title&gt;first article&lt;/title&gt;
  &lt;subject&gt;James&lt;/James&gt;
  &lt;/article&gt;
  &lt;article&gt;
  &lt;title&gt;second article&lt;/title&gt;
  &lt;subject&gt;James&lt;/subject&gt;
  &lt;/article&gt;
  &lt;/magazine&gt;
  </code></pre>
  
  <p>I want to output a list of articles in a format of <code>&lt;issue.number&gt;, &lt;title&gt;</code>. </p>
  
  <p>So I created an XQuery:</p>
  
  <pre><code>for $x in /magazine
  return concat($x/issue.number/text(),',',$x//title/text())
  </code></pre>
  
  <p>This results in an error, which I think is caused because the <code>&lt;issue.number&gt;</code> value is being returned twice. In eXist DB I get this:</p>
  
  <blockquote>
    <p>The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: concat($atomizable-values as xdt:anyAtomicType?, ...) xs:string?. Expected cardinality: zero or one, got 2.</p>
  </blockquote>
  
  <p>So if I can't use <code>concat()</code> what can I use?</p>