'Convert the URL provided in :param:`href` from a reference
relative to this manifest item to a book-absolute reference.'

def abshref(self, href):

    try:
        purl = urlparse(href)
    except ValueError:
        return href
    scheme = purl.scheme
    if (scheme and (scheme != 'file')):
        return href
    purl = list(purl)
    purl[0] = ''
    href = urlunparse(purl)
    (path, frag) = urldefrag(href)
    if (not path):
        if frag:
            return '#'.join((self.href, frag))
        else:
            return self.href
    if ('/' not in self.href):
        return href
    dirname = os.path.dirname(self.href)
    href = os.path.join(dirname, href)
    href = os.path.normpath(href).replace('\\', '/')
    return href
