(test_xmlschema_doc, root)
return valid
:param test_xmlschema_doc: Parsed XSD file with Xades imports
        :param root: xml
        :return: bool
:param test_xmlschema_doc: Parsed XSD file with Xades imports
        :param root: xml
        :return: bool
: param test_xmlschema_doc : Parsed XSD file with Xades imports : param root : xml : return : bool
def xml_is_valid(test_xmlschema_doc, root):
        """
        :param test_xmlschema_doc: Parsed XSD file with Xades imports
        :param root: xml
        :return: bool
        """
        schema = etree.XMLSchema(test_xmlschema_doc)
        try:
            schema.assertValid(root)
            valid = True
        except etree.DocumentInvalid as error:
            _logger.exception(error)
            valid = False
        return valid
def xml_is_valid ( test_xmlschema_doc , root ) : schema = etree . XMLSchema ( test_xmlschema_doc ) try : schema . assertValid ( root ) valid = True except etree . DocumentInvalid as error : _logger . exception ( error ) valid = False return valid