private static boolean isKeyValue(XPathExpression argument) {
    if (argument.getXPathContext() instanceof Xslt2ContextProvider) {
      return argument instanceof XPathString || argument instanceof XPathNumber || argument instanceof XPathVariableReference;
    } else {
      return argument instanceof XPathString;
    }
  }
private static boolean isKeyValue(XPathExpression argument)