title: XPath query in a recursive DTD
body: <p>I'm using XPath 3.0 and I've the following problem.
  I need to write a function that returns true/false, checking whether the names of the resources (files and folders) are such that all resources have a distinct pathname.</p>
  
  <p><img src="https://i.stack.imgur.com/m8vdS.jpg" alt="This is my Document Type Definition "></p>
  
  <p>I am able to retrieve the name of the ancestor nodes folders of a specific folder but then I cannot think of how to build a "path name" from that to then perform the comparison. Any idea?</p>