@classmethod
def _get_style_sources(cls, styling_section, element):
    """Returns a list, containing  tags, in the order they should be
        evaluated, for determining layout information.

        This method should be extended if the styles provided by it are not
        enough (like for the captions created with CaptionMaker 6, which are
        not compatible with the specs)

        Check the URL for detailed description of how styles should be resolved
        http://www.w3.org/TR/ttaf1-dfxp/#semantics-style-association

        Returns:
          1. All child styles of the element, each with its reference chain
          2. The style referenced by the element, via the attrib. style="asdf"
            together with its reference chain
        Note: the specs are unclear about the priority of styles that are
        referenced by nested styles. I've assumed it's higher than referential
        styling
        """
    if not hasattr(element, u'findAll'):
        return ()
    nested_styles = []
    if element.name not in (u'div', u'body', u'tt'):
        for style in element.contents:
            if getattr(style, u'name', None) == u'style':
                nested_styles.extend(cls._get_style_reference_chain(style,
                    styling_section))
    referenced_style_id = element.get(u'style')
    referenced_styles = []
    if referenced_style_id and styling_section:
        referenced_style = styling_section.findChild(u'style', {u'xml:id':
            referenced_style_id})
        referenced_styles = cls._get_style_reference_chain(referenced_style,
            styling_section)
    return nested_styles + referenced_styles
