public static boolean isMode(XmlAttribute xmlattribute) {
    if ("mode".equals(xmlattribute.getName())) {
      final XmlTag parent = xmlattribute.getParent();
      return isApplyTemplates(parent) || isTemplate(parent, false);
    }
    return false;
  }
public static boolean isMode(XmlAttribute xmlattribute)