public void validate(final ErrorHandler errorHandler)
    {
        final Deque<String> path = new ArrayDeque<>();

        for (final Type type : typeByNameMap.values())
        {
            validateType(errorHandler, path, type);
        }

        for (final Message message : messageByIdMap.values())
        {
            if (message.sinceVersion() > version)
            {
                errorHandler.error(message.name() + ".sinceVersion=" + message.sinceVersion() +
                    " > messageSchema.version=" + version);
            }

            path.addLast(message.name());

            for (final Field field : message.fields())
            {
                validateField(errorHandler, path, field);
            }

            path.removeLast();
        }
    }
Validate the message schema and delegate warnings and errors to the supplied {@link ErrorHandler}.

@param errorHandler for delegating warnings and errors.
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/MessageSchema.java