public static boolean isPatternAttribute(@NotNull XmlAttribute attribute) {
    if (!isXsltAttribute(attribute)) return false;

    final String name = attribute.getName();
    if ("match".equals(name)) {
      return true;
    }
    else if ("count".equals(name) || "from".equals(name)) {
      return "number".equals(attribute.getParent().getLocalName());
    }
    return false;
  }
public static boolean isPatternAttribute(@NotNull XmlAttribute attribute)