def validate_schema(filename, version=u'1.1'):
 if (version not in (u'1.0', u'1.1', u'1.2', u'1.3')):
  log.info(u'{0} has version {1}, using schema 1.1'.format(filename, version))
  version = u'1.1'
 if (version in (u'1.1', u'1.2', u'1.3')):
  schema_path = data.get_pkg_data_filename(u'data/VOTable.v{0}.xsd'.format(version))
 else:
  schema_path = data.get_pkg_data_filename(u'data/VOTable.dtd')
 return validate.validate_schema(filename, schema_path)

def validate_schema ( filename , version = u'1.1' ) : if ( version not in ( u'1.0' , u'1.1' , u'1.2' , u'1.3' ) ) : log . info ( u'{0} has version {1}, using schema 1.1' . format ( filename , version ) ) version = u'1.1' if ( version in ( u'1.1' , u'1.2' , u'1.3' ) ) : schema_path = data . get_pkg_data_filename ( u'data/VOTable.v{0}.xsd' . format ( version ) ) else : schema_path = data . get_pkg_data_filename ( u'data/VOTable.dtd' ) return validate . validate_schema ( filename , schema_path )
validates an xml file against a schema or dtd .