class MergeLimitationsValidator implements DocumentViewXmlValidator {

    @Override
    public Collection<ValidationMessage> validate(@NotNull DocViewNode node, @NotNull String nodePath, @NotNull Path filePath, boolean isRoot) {
        // find out if one of the filter roots is pointing to any of the aggregator's non-root nodes
        if (!isRoot && !node.props.isEmpty() && rootNodePathsOfMergeRules.contains(nodePath)) {
            return Collections.singleton(new ValidationMessage(severity, String.format(PACKAGE_NON_ROOT_NODE_MERGED, nodePath)));
        }
        return null;
    }

    public  MergeLimitationsValidator(ValidationMessageSeverity severity, WorkspaceFilter filter);

}