title: XPath: get element type
body: <p>This is an XPath query which would print full path of every element in the file</p>
  
  <pre><code>for $boy in //*
  return string-join(($boy/ancestor-or-self::*/name()), "::")
  </code></pre>
  
  <p>How do I get the element's type as well (I need to know primitive types foremost: <code>xs:integer</code>, <code>xs:string</code>, etc)?</p>