# File lib/openid/extensions/sreg.rb, line 45
    def OpenID.get_sreg_ns(message)
      [NS_URI_1_1, NS_URI_1_0].each{|ns|
        if message.namespaces.get_alias(ns)
          return ns
        end
      }
      # try to add an alias, since we didn't find one
      ns = NS_URI_1_1
      begin
        message.namespaces.add_alias(ns, 'sreg')
      rescue IndexError
        raise NamespaceError
      end
      return ns
    end