INTERACTIVE exploration of capabilities document(s) starting at a given URI.

        Will flag warnings if the document is not of type listed in caps.

def explore_uri(self, explorer_resource, show_back=True):
        """INTERACTIVE exploration of capabilities document(s) starting at a given URI.

        Will flag warnings if the document is not of type listed in caps.
        """
        uri = explorer_resource.uri
        caps = explorer_resource.acceptable_capabilities
        checks = explorer_resource.checks
        print("Reading %s" % (uri))
        options = {}
        capability = None
        try:
            if (caps == 'resource'):
                # Not expecting a capability document
                self.explore_show_head(uri, check_headers=checks)
            else:
                s = Sitemap()
                list = s.parse_xml(url_or_file_open(uri))
                (options, capability) = self.explore_show_summary(
                    list, s.parsed_index, caps, context=uri)
        except IOError as e:
            print("Cannot read %s (%s)" % (uri, str(e)))
        except Exception as e:
            print("Cannot parse %s (%s)" % (uri, str(e)))
        #
        # Loop until we have some valid input
        #
        while (True):
            # don't offer number option for no resources/capabilities
            num_prompt = '' if (len(options) == 0) else 'number, '
            up_prompt = 'b(ack), ' if (show_back) else ''
            if (self.fake_input):
                inp = self.fake_input
            else:
                inp = input("Follow [%s%sq(uit)]?" % (num_prompt, up_prompt))
            if (inp in options.keys()):
                break
            if (inp == 'q'):
                raise ExplorerQuit()
            if (inp == 'b'):
                return(None)
        #
        # Got input that is one of the options
        #
        checks = {}
        r = options[inp]
        if (r.capability is None):
            if (capability in ['resourcelist', 'changelist',
                               'resourcedump', 'changedump']):
                caps = 'resource'
            else:
                caps = self.allowed_entries(capability)
        elif (r.capability is 'resource'):
            caps = r.capability
        else:
            caps = [r.capability]
        # Record anything we know about the resource to check
        if (r.length is not None):
            checks['content-length'] = r.length
        if (r.lastmod is not None):
            checks['last-modified'] = r.lastmod
        if (r.mime_type is not None):
            checks['content-type'] = r.mime_type
        # FIXME - could add fixity checks here too
        return(XResource(r.uri, caps, checks))