title: Why does my query report "Steps within a path expression must yield nodes"?
body: <p>I'm relatively new to XQuery and I'm using a XML with the following format (MODSXML):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;modsCollection xmlns="http://www.loc.gov/mods/v3" 
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                    xsi:schemaLocation="http://www.loc.gov/mods/v3 
                   http://www.loc.gov/standards/mods/v3/mods-3-0.xsd"&gt;
  
  &lt;mods ID="ISI:000330282600027" version="3.0"&gt;
  &lt;titleInfo&gt;
  &lt;title&gt;{Minimum Relative Entropy for Quantum Estimation: Feasibility and General
   Solution}&lt;/title&gt;
  &lt;/titleInfo&gt;
  </code></pre>
  
  <p>I'm trying to retrieva all titles of the articles contained on the XML file. The expression I'm using is the following: </p>
  
  <pre><code>for $x in collection("ExemploBibtex")/"quantuminformation.xml"/modsCollection/mods/titleInfo/title
  return &lt;title&gt;$x/text()&lt;/title&gt;
  </code></pre>
  
  <p>When I try to run this expression on Base, I get the following error: </p>
  
  <blockquote>
    <p>"[XPTY0019] Steps within a path expression must yield nodes; xs:string
    found."</p>
  </blockquote>
  
  <p>Can anybody tell me what's wrong? The result I was expecting was a list with all the titles in the document.</p>