예제 #1
0
  @Override
  protected void validateAttributes() {
    if (!isSystemTag()) {
      return;
    }

    Set<String> allowedAttributes = getAllowedAttributes();
    for (int i = 0; i < xmlReader.getAttributeCount(); i++) {
      QName qname = xmlReader.getAttributeName(i);
      String localPart = qname.getLocalPart();
      String prefix = qname.getPrefix();
      if (prefix != null && !prefix.isEmpty() && !prefix.equalsIgnoreCase(SYSTEM_TAG_PREFIX)) {
        throw new InvalidSystemAttributeException(prefix + ":" + localPart, getLocation());
      } else if (!AuraTextUtil.containsIgnoreCase(localPart, allowedAttributes)) {
        throw new InvalidSystemAttributeException(localPart, getLocation());
      }
    }
  }