title: org.jdom2.xpath doesn't return results on queries from html head element
body: <p>I am using <code>org.jdom2.xpath</code> to evaluate <code>XPath</code> queries on <code>html</code> documents.
  Attempting to retreive a script text from the <code>head</code> element, I tried this query:</p>
  
  <pre><code>/html/head/script[contains(text(), 'expression1') and contains(text(), 'expression2')]/text()
  </code></pre>
  
  <p>This query returns a single result in both <a href="https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl?hl=en" rel="nofollow noreferrer">XPath Helper</a> and <a href="https://stackoverflow.com/questions/3030487/is-there-a-way-to-get-the-xpath-in-google-chrome">Chrome console (<code>$x</code> queries)</a> but retuns an empty result set using <code>org.jdom2.xpath</code>. </p>
  
  <p>Trying the simpler (but heavier) query: </p>
  
  <pre><code>//script[contains(text(), 'expression1') and contains(text(), 'expression2')]/text()
  </code></pre>
  
  <p>produces the same results.</p>
  
  <p>Code sample:</p>
  
  <pre><code>String xpath = "/html/head/script[contains(text(), 'expression1') and contains(text(), 'expression2')]/text()";
  List&lt;Text&gt; tokeScriptResults = (List&lt;Text&gt;) xpathFactory.compile(xpath).evaluate(document);
  </code></pre>
  
  <p>Afterthought: looking at the <code>Document</code> object, I see that since the script text is very long that <code>jdom2</code> split it into an array of <code>Text</code>s instead of one long <code>Text</code>. Could this be the issue?</p>