if (!docprop.containsKey(BELDocumentProperty.NAME)) {
addError(new DocumentNameException(lastDocumentPropertyLocation, 0));
} else if (!docprop.containsKey(BELDocumentProperty.DESCRIPTION)) {
addError(new DocumentDescriptionException(lastDocumentPropertyLocation, 0));
} else if (!docprop.containsKey(BELDocumentProperty.VERSION)) {
addError(new DocumentVersionException(lastDocumentPropertyLocation, 0));
} else {
if (documentStatementGroup.getStatements().isEmpty()) {
// statements are only contained in explicitly-defined statement groups
retval.doc = new BELDocument(BELDocumentHeader.create(docprop), adlist, nslist, statementGroups);
} else {