code: function xsltMatch(match, context) {
    var expr = xpathParse(match);
  
    var ret;
    // Shortcut for the most common case.
    if (expr.steps && !expr.absolute && expr.steps.length == 1 &&
        expr.steps[0].axis == 'child' && expr.steps[0].predicate.length == 0) {
      ret = expr.steps[0].nodetest.evaluate(context).booleanValue();
  
    } else {
  
      ret = false;
      var node = context.node;
  
      while (!ret && node) {
        var result = expr.evaluate(context.clone(node,0,[node])).nodeSetValue();
        for (var i = 0; i < result.length; ++i) {
          if (result[i] == context.node) {
            ret = true;
            break;
          }
        }
        node = node.parentNode;
      }
    }
  
    return ret;
  }
docs: Evaluates an XPath expression in the current input context as a match (see [XSLT] section 5.2, paragraph 1).