title: XPath expression
body: <p>This question regards XPath expressions.</p>
  
  <p>I want to find the average of the length of all URLs in a Web page, that point to a <strong>.pdf</strong> file. </p>
  
  <p>So far I have constructed the following expression, but it does not work:</p>
  
  <blockquote>
    <p>sum(string-length(string(//a/@href[contains(., ".pdf")]))) div
    count(//a/@href[contains(., ".pdf")])</p>
  </blockquote>
  
  <p>Any help will be appreciated!</p>