def get_schemaloc_string(self, ns_uris=None, sort=False, delim="\n"):
        if not ns_uris:
            ns_uris = six.iterkeys(self.__ns_uri_map)
        if sort:
            ns_uris = sorted(ns_uris)
        schemalocs = []
        for ns_uri in ns_uris:
            ni = self.__lookup_uri(ns_uri)
            if ni.schema_location:
                schemalocs.append("{0.uri} {0.schema_location}".format(ni))
        if not schemalocs:
            return ""
        return 'xsi:schemaLocation="{0}"'.format(delim.join(schemalocs))