def is_aa(entity): return has_tag(entity, "{%s}AttributeAuthorityDescriptor" % NS['md'])
def is_sp(entity): return has_tag(entity, "{%s}SPSSODescriptor" % NS['md'])