@classmethod
def _get_xsd_enum_values(cls, xsd_schemas, xml_field):
    """Get the distinct enum values from XSD schemas for a given XML field.

        Depending of the 'xsd_type' of the XML field, retrieve the distinct
        enum values and definitions from the XSD schemas.

        Parameters
        ----------
        xsd_schemas : list of etree.ElementTree
            List of parsed XSD schemas.
        xml_field : dict
            Dictionary describing the XML field, including a 'xsd_type' key
            linking the type to the enum type in (one of) the XSD schemas.

        Returns
        -------
        values : dict
            Dictionary containing the enum values as keys (in the datatype
            of the XML field) and the definitions as values.

        """
    values = None
    if xml_field.get('xsd_type', None):
        values = {}
        for schema in xsd_schemas:
            tree_values = schema.findall(
                './/{{http://www.w3.org/2001/XMLSchema}}simpleType[@name="{}"]/{{http://www.w3.org/2001/XMLSchema}}restriction/{{http://www.w3.org/2001/XMLSchema}}enumeration'
                .format(xml_field.get('xsd_type')))
            for e in tree_values:
                value = cls._typeconvert(e.get('value'), xml_field.get('type'))
                values[value] = e.findtext(
                    './{http://www.w3.org/2001/XMLSchema}annotation/{http://www.w3.org/2001/XMLSchema}documentation'
                    )
    return values
