Validate given pipeline document.

        The method is trying to load, parse and validate the spline document.
        The validator verifies the Python structure B{not} the file format.

        Args:
            definition (str): path and filename of a yaml file containing a valid spline definition.

        Returns:
            dict: loaded and validated spline document.

        Note:
            if validation fails the application does exit!

        See Also:
            spline.validation.Validator

def validate_document(self, definition):
        """
        Validate given pipeline document.

        The method is trying to load, parse and validate the spline document.
        The validator verifies the Python structure B{not} the file format.

        Args:
            definition (str): path and filename of a yaml file containing a valid spline definition.

        Returns:
            dict: loaded and validated spline document.

        Note:
            if validation fails the application does exit!

        See Also:
            spline.validation.Validator
        """
        initial_document = {}
        try:
            initial_document = Loader.load(definition)
        except RuntimeError as exception:
            self.logger.error(str(exception))
            sys.exit(1)

        document = Validator().validate(initial_document)
        if document is None:
            self.logger.info("Schema validation for '%s' has failed", definition)
            sys.exit(1)
        self.logger.info("Schema validation for '%s' succeeded", definition)
        return document