def construct_dataset_url(
        request,
        service_base,
        url):
    """
    Construct a url to a dataset, given a *catalog request*, *service_base*
    and *url*.

    It is assumed that *url* is relative to *service_base*.
    """
    return "{}://{}{}{}".format(request.get_type(), request.get_host(),
        service_base, url)