{ return new ElementAvailableFunction(this); }
return new ElementAvailableFunction(new NamespaceProxy(current));
  public XPathFunction resolveFunction(QName name, int arity)  {    String uri = name.getNamespaceURI();    if (XSL_NS.equals(uri) || uri == null || uri.length() == 0)      {        String localName = name.getLocalPart();        if ("document".equals(localName) && (arity == 1 || arity == 2))          {            if (current == null)              {                throw new RuntimeException("current is null");              }            return new DocumentFunction(getRootStylesheet(), current);          }        else if ("key".equals(localName) && (arity == 2))          {            return new KeyFunction(getRootStylesheet());          }        else if ("format-number".equals(localName) &&                 (arity == 2 || arity == 3))          {            return new FormatNumberFunction(getRootStylesheet());          }        else if ("current".equals(localName) && (arity == 0))          {            return new CurrentFunction(getRootStylesheet());          }        else if ("unparsed-entity-uri".equals(localName) && (arity == 1))          {            return new UnparsedEntityUriFunction();          }        else if ("generate-id".equals(localName) &&                 (arity == 1 || arity == 0))          {            return new GenerateIdFunction();          }        else if ("system-property".equals(localName) && (arity == 1))          {            return new SystemPropertyFunction();          }        else if ("element-available".equals(localName) && (arity == 1))          {            return new ElementAvailableFunction(this);          }        else if ("function-available".equals(localName) && (arity == 1))          {            return new FunctionAvailableFunction(this);          }      }    return null;  }