@classmethod
def callback_hash_attribute_value_element_value_consitency(cls, element,
    hashpipe, children=True):
    """
        calculate hash over attribute_values, pre- and post-text

        :param element: etree.element
        :param hashpipe: hash algorithm interface
        :param children: bool - if false children of element ignored for hash calculation
        """
    _element_childes = element.getchildren()
    if children:
        for child in _element_childes:
            hashpipe.update(cls.
                callback_hash_attribute_value_element_value_consitency(
                child, hashpipe))
    if hasattr(element, 'attrib'):
        for _name in sorted(element.attrib.keys()):
            _attrib_value = element.attrib[_name]
            hashpipe.update(bytes(_attrib_value + '#att', 'utf-8'))
    if element.text is not None:
        hashpipe.update(bytes(element.text.strip() + '#txt', 'utf-8'))
    if element.tail is not None:
        hashpipe.update(bytes(element.tail.strip() + '#txt', 'utf-8'))
    return bytes(hashpipe.hexdigest(), 'utf-8')
