title: can not make xpath with functions work with JDOM2
body: <p>I used JDOM1 before to parse xmls with xpath, and tired with the non-generic style, so I decide to try JDOM2, OK, everything works perfect for me ( the generic, XPathFactory, XPathExpression). then I try a xpath statement with contains function :</p>
  
  <pre><code>XPathExpression&lt;Text&gt; timeXpath = XPathFactory.instance().compile(
      "./p[contains(.,'time:')]/text()", Filters.textOnly());
  String time = timeXpath.evaluateFirst(div).getTextTrim();
  </code></pre>
  
  <p>then I got exeptions:</p>
  
  <pre><code>java.lang.IllegalStateException: Unable to evaluate expression. See cause
      at org.jdom2.xpath.jaxen.JaxenCompiled.evaluateRawFirst(JaxenCompiled.java:200)
      at org.jdom2.xpath.util.AbstractXPathCompiled.evaluateFirst(AbstractXPathCompiled.java:327)
      at peace.org.tm.spider.star.DamaiStarSpider.syncStarTracks(DamaiStarSpider.java:123)
      at peace.org.tm.spider.star.DamaiStarSpider.main(DamaiStarSpider.java:156)
  Caused by: org.jaxen.UnresolvableException: Function :contains
      at org.jaxen.SimpleFunctionContext.getFunction(SimpleFunctionContext.java:142)
      at org.jaxen.ContextSupport.getFunction(ContextSupport.java:189)
      at org.jaxen.Context.getFunction(Context.java:153)
      at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:183)
      at org.jaxen.expr.DefaultPredicate.evaluate(DefaultPredicate.java:106)
      at org.jaxen.expr.PredicateSet.evaluatePredicates(PredicateSet.java:188)
      at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:218)
  </code></pre>
  
  <p>then I tried:</p>
  
  <pre><code>XPathExpression&lt;Text&gt; timeXpath = XPathFactory.instance().compile(
      "./p[fn:contains(.,'time:')]/text()", Filters.textOnly());
  String time = timeXpath.evaluateFirst(div).getTextTrim();
  </code></pre>
  
  <p>xpath compile failed:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unable to compile './p[fn:contains(.,'time:')]/text()'. See Cause.
      at org.jdom2.xpath.jaxen.JaxenCompiled.&lt;init&gt;(JaxenCompiled.java:152)
      at org.jdom2.xpath.jaxen.JaxenXPathFactory.compile(JaxenXPathFactory.java:82)
      at org.jdom2.xpath.XPathFactory.compile(XPathFactory.java:282)
      at peace.org.tm.spider.star.DamaiStarSpider.syncStarTracks(DamaiStarSpider.java:91)
      at peace.org.tm.spider.star.DamaiStarSpider.main(DamaiStarSpider.java:156)
  Caused by: org.jaxen.XPathSyntaxException: Unexpected '('
      at org.jaxen.BaseXPath.&lt;init&gt;(BaseXPath.java:136)
      at org.jaxen.BaseXPath.&lt;init&gt;(BaseXPath.java:157)
      at org.jdom2.xpath.jaxen.JaxenCompiled.&lt;init&gt;(JaxenCompiled.java:150)
      ... 4 more
  </code></pre>
  
  <p>I already google the stack trace for about 2 hours, nothing useful founded, I think maybe I made a very stupid mistake, is anyone can figure it out for me? thanks!</p>