Line breaks (\n) via concat() in XPath?
<p>So I have an XML document of employees in my system:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
&lt;couriersystem title="System"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="schema.xsd"&gt;
    &lt;!-- snip --&gt;
    &lt;employees&gt;
        &lt;employee eid="1"&gt;
            &lt;nin&gt;AZ123518D&lt;/nin&gt;
            &lt;firstname&gt;Peter&lt;/firstname&gt;
            &lt;lastname&gt;Smith&lt;/lastname&gt;
            &lt;gender&gt;Male&lt;/gender&gt;
            &lt;dob&gt;1994-02-11&lt;/dob&gt;
            &lt;email&gt;ps11@gmail.com&lt;/email&gt;
            &lt;address&gt;
                119, London Street, Nidrie, F57 8NE
            &lt;/address&gt;
            &lt;tel&gt;07005748900&lt;/tel&gt;
            &lt;salary&gt;30526&lt;/salary&gt;
            &lt;empbranch bid="1" /&gt;
            &lt;supervisor sid="1" /&gt;
        &lt;/employee&gt;
        &lt;employee eid="2"&gt;
            &lt;nin&gt;CN174869F&lt;/nin&gt;
            &lt;firstname&gt;Jennifer&lt;/firstname&gt;
            &lt;lastname&gt;Black&lt;/lastname&gt;
            &lt;gender&gt;Male&lt;/gender&gt;
            &lt;dob&gt;1984-12-24&lt;/dob&gt;
            &lt;email&gt;jb21@gmail.com&lt;/email&gt;
            &lt;address&gt;
                161, South Road, Nidrie, W79 8WG
            &lt;/address&gt;
            &lt;tel&gt;07555111222&lt;/tel&gt;
            &lt;salary&gt;40576&lt;/salary&gt;
            &lt;empbranch bid="2" /&gt;
            &lt;supervisor sid="1" /&gt;
        &lt;/employee&gt;
        &lt;employee eid="3"&gt;
            &lt;nin&gt;ET127654M&lt;/nin&gt;
            &lt;firstname&gt;Aaron&lt;/firstname&gt;
            &lt;lastname&gt;Jones&lt;/lastname&gt;
            &lt;gender&gt;Male&lt;/gender&gt;
            &lt;dob&gt;1968-03-15&lt;/dob&gt;
            &lt;email&gt;aj31@gmail.com&lt;/email&gt;
            &lt;address&gt;
                66, High Road, Yoker, Q47 4SR
            &lt;/address&gt;
            &lt;tel&gt;07856471267&lt;/tel&gt;
            &lt;salary&gt;30526&lt;/salary&gt;
            &lt;empbranch bid="3" /&gt;
            &lt;supervisor sid="1" /&gt;
        &lt;/employee&gt;
        &lt;employee eid="4"&gt;
            &lt;nin&gt;GC765238A&lt;/nin&gt;
            &lt;firstname&gt;Alistair&lt;/firstname&gt;
            &lt;lastname&gt;Smith&lt;/lastname&gt;
            &lt;gender&gt;Male&lt;/gender&gt;
            &lt;dob&gt;1976-11-26&lt;/dob&gt;
            &lt;email&gt;as11@gmail.com&lt;/email&gt;
            &lt;address&gt;
                109, West Plaza, Clydebank, G55 8RC
            &lt;/address&gt;
            &lt;tel&gt;07000123123&lt;/tel&gt;
            &lt;salary&gt;25400&lt;/salary&gt;
            &lt;empbranch bid="4" /&gt;
            &lt;supervisor sid="1" /&gt;
        &lt;/employee&gt;
        &lt;employee eid="5"&gt;
            &lt;nin&gt;HP146854D&lt;/nin&gt;
            &lt;firstname&gt;Emma&lt;/firstname&gt;
            &lt;lastname&gt;Reynolds&lt;/lastname&gt;
            &lt;gender&gt;Male&lt;/gender&gt;
            &lt;dob&gt;1995-05-05&lt;/dob&gt;
            &lt;email&gt;er11@yahoo.com&lt;/email&gt;
            &lt;address&gt;
                57, Scott Street, Aberdeen, O75 2KS
            &lt;/address&gt;
            &lt;tel&gt;07625361536&lt;/tel&gt;
            &lt;salary&gt;25400&lt;/salary&gt;
            &lt;empbranch bid="5" /&gt;
            &lt;supervisor sid="7" /&gt;
        &lt;/employee&gt;
        &lt;!-- snip --&gt;
    &lt;/employees&gt;
    &lt;!-- snip --&gt;
&lt;/couriersystem&gt;
</code></pre>

<p>And I have the following XPath to retrieve all of the employee details by their supervisor:</p>

<pre><code>//employee[supervisor/@sid='1']/concat('Name: ', concat(firstname/text(), ' ', lastname/text(), '\nGender: ', gender/text(), '\nD.O.B: ', dob/text()))
</code></pre>

<p><strong>But it only shows one employee out of the rest of them, and the <code>\n</code> characters show as well.</strong></p>

<p>How can I fix this issue?</p>