title: Saxon HE and XQuery: Unexpected token "<eof>"
body: <p>I copy paste this example from <a href="http://www.w3schools.com/xquery/xquery_functions.asp" rel="nofollow">http://www.w3schools.com/xquery/xquery_functions.asp</a> (though I added the namespace declaration):</p>
  
  <pre><code>declare namespace local="local";
  declare function local:minPrice($p as xs:decimal?,$d as xs:decimal?) as
  xs:decimal? {
      let $disc := ($p * $d) div 100
      return ($p - $disc)
  };
  </code></pre>
  
  <p>But when I try to run it, the SAXON output is:</p>
  
  <pre><code>Error on line 6 column 1 of newq.xq:
  XPST0003 XQuery syntax error near #...v 100 return ($p - $disc) };#:
  Unexpected token "&lt;eof&gt;" in path expression
  Static error(s) in query
  </code></pre>
  
  <p>Anyone idea? Bug in SAXON, or is it using another syntax?</p>