private static void validateIncludedFile(Element includedRootElem, String parentTagName, String dirName) {
        if (!parentTagName.equals(includedRootElem.getTagName())) {
            throw new IllegalArgumentException("File included from '<include dir\"" + dirName +
                    "\">' does not have <" + parentTagName + "> as root element.");
        }
        if (includedRootElem.hasAttributes()) {
            throw new IllegalArgumentException("File included from '<include dir\"" + dirName +
                    "\">' has attributes set on its root element <" + parentTagName +
                    ">. These must be set in services.xml instead.");
        }
        if (XML.getChild(includedRootElem, INCLUDE) != null) {
            throw new IllegalArgumentException("File included from '<include dir\"" + dirName +
                    "\">' has <include> subelement. Recursive inclusion is not supported.");
        }
    }
@param includedRootElem  The root element of the included file
@param dirName  The name of the included dir
config-application-package/src/main/java/com/yahoo/config/model/application/provider/IncludeDirs.java