title: How to fetch distinct nodes in XQuery?
body: <p>When applying the function <code>distinct-values()</code> to a sequence of nodes, it returns a sequence of values rather than a sequence of nodes. </p>
  
  <p>Please can someone explain to me which feature of the XQuery data model makes it difficult to eliminate duplicate values directly on a sequence of nodes? </p>
  
  <p>Also, how can this sequence of values be turned back into a sequence of nodes?</p>
  
  <p>I've looked through my XML/XQuery notes and scoured the internet without finding explicit information.</p>