# File lib/openid/yadis/xri.rb, line 68
      def self.root_authority(xri)
        xri = xri[6..-1] if xri.index('xri://') == 0
        authority = xri.split('/', 2)[0]
        if authority[0].chr == '('
          root = authority[0...authority.index(')')+1]
        elsif XRI_AUTHORITIES.member?(authority[0].chr)
          root = authority[0].chr
        else
          root = authority.split(/[!*]/)[0]
        end

        self.make_xri(root)
      end