private XmlAttlistDecl[] findAttlistDeclarations(String elementName) {
    final List<XmlAttlistDecl> result = new ArrayList<>();
    for (final XmlAttlistDecl declaration : getAttlistDeclarations()) {
      final String name = declaration.getName();
      if (name != null && name.equals(elementName)) {
        result.add(declaration);
      }
    }
    return result.toArray(XmlAttlistDecl.EMPTY_ARRAY);
  }
private XmlAttlistDecl[] findAttlistDeclarations(String elementName)