Get the ``xlink:href`` of this file.
421912
def url(self):
        
        el_FLocat = self._el.find(TAG_METS_FLOCAT)
        if el_FLocat is not None:
            return el_FLocat.get("{%s}href" % NS["xlink"])
        return ''
324636
def iter_processed_links(self, file, encoding=None, base_url=None, context=False):
        '''
        '''
        if context:
            return [item for item in self.iter_processed_text(file, encoding, base_url) if item[1]]
        else:
            return [item[0] for item in self.iter_processed_text(file, encoding, base_url) if item[1]]
80470
protected String linkToFile(File f) {
        String url = getWikiUrl(f.getAbsolutePath());
        if (url == null) {
            url = f.toURI().toString();
        }
        return String.format("<a href=\"%s\" target=\"_blank\">%s</a>", url, f.getName());
    }
1028433
def href(self):
        
        url = self.session.base_url + str(self.path)
        if self.path.is_collection and not self.path.is_root:
            return url + 's'
        return url
1201183
def read_links(self, file, encoding=None):
        '''
        '''
        return [item[0] for item in self.iter_text(file, encoding) if item[1]]
726598
def get_url_file_ext(url):
    """"""
    # get the last part of the path component
    filename = url.split('/')[-1]
    name, ext = os.path.splitext(filename)

    # handle case of files with leading dot
    if not ext and name and name[0] == '.':
        ext = name

    return ext
237242
private function getXPath(): \DOMXPath
    {
        $xpath = new \DOMXPath($this);
        $xpath->registerNamespace('xlf', self::XLIFF_NS);

        return $xpath;
    }
1221626
def get_context_from_xlsx(self):
        
        if re.search('^(http|https)://', self.project.CONTEXT_SOURCE_FILE):
            resp = requests.get(self.project.CONTEXT_SOURCE_FILE)
            content = resp.content
        else:
            try:
                with open(self.project.CONTEXT_SOURCE_FILE) as xlsxfile:
                    content = xlsxfile.read()
            except IOError:
                filepath = "%s/%s" % (
                    os.path.abspath(self.path),
                    self.project.CONTEXT_SOURCE_FILE)
                with open(filepath) as xlsxfile:
                    content = xlsxfile.read()

        data = process_xlsx(content)
        if 'values' in data:
            data = copy_global_values(data)

        return data
1244283
def get(self, href):
        """"""
        if self.is_fake:
            return

        uid = _trim_suffix(href, ('.ics', '.ical', '.vcf'))
        etesync_item = self.collection.get(uid)
        if etesync_item is None:
            return None

        try:
            item = vobject.readOne(etesync_item.content)
        except Exception as e:
            raise RuntimeError("Failed to parse item %r in %r" %
                               (href, self.path)) from e
        # FIXME: Make this sensible
        last_modified = time.strftime(
            "%a, %d %b %Y %H:%M:%S GMT",
            time.gmtime(time.time()))
        return EteSyncItem(self, item, href, last_modified=last_modified, etesync_item=etesync_item)
452750
def _get_entry_link(self, entry):
        
        entry_link = None
        for link in entry.link:
            if '/data/' not in link.href and '/lh/' not in link.href:
                entry_link = link.href
                break
        return entry_link or entry.link[0].href
1146040
def link(self):
    """"""
    if not self.IsLink():
      return ''

    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return ''

    return self._file_system.GetDataByPath(location)
1345875
def loadLinks(self):
        """"""
        CheckParent(self)

        val = _fitz.Page_loadLinks(self)

        if val:
            val.thisown = True
            val.parent = weakref.proxy(self) # owning page object
            self._annot_refs[id(val)] = val
            if self.parent.isPDF:
                val.xref = self._getLinkXrefs()[0]
            else:
                val.xref = 0


        return val
850605
def get_link(self, text=None, *args, **kwargs):
        
        return helpers.find(
            self.parsed, _link_ptn, text=text, *args, **kwargs
        )
1224017
def base_link(rel, self_rel=False):
    """"""
    link = _BASE_LINKS[rel].copy()
    link['rel'] = 'self' if self_rel else rel
    return link
380848
function(element) {
				var links = element.querySelectorAll("a.xref, a.link, area"),
					i,
					link,
					href,
					startsWithHash,
					startsWithHTTP;

				for (i = 0; i < links.length; i++) {
					link = links[i];
					href = link.getAttribute("href");
					startsWithHash = href.indexOf("#") == 0;
					startsWithHTTP = href.indexOf("http") == 0;

					// absolute links should open in a new window
					if (startsWithHTTP) {
						link.setAttribute('target', '_blank');
					}
					// absolute links and links starting with # are ok and should not be modified
					if (startsWithHTTP || startsWithHash) {
						continue;
					}

					// API reference are recognized by "/docs/api/" string
					if (href.indexOf("/docs/api/") > -1) {
						href = href.substr(0, href.lastIndexOf(".html"));
						href = href.substr(href.lastIndexOf('/') + 1);
						href = "#/api/" + href;
					} else if (href.indexOf("explored.html") > -1) { // explored app links have explored.html in them
						href = href.split("../").join("");
						href = oConfig.exploredURI + href;
					} else { // we assume all other links are links to other documentation pages
						href = href.substr(0, href.lastIndexOf(".html"));
						href = "#/topic/" + href;
					}

					link.setAttribute("href", href);
				}
			}
1344901
def link(source_path):
    """"""
    if not os.path.isfile(source_path):
        raise SourceNotFound(source_path)
    with open(source_path, 'r') as f:
        content = f.read()
    block_map = BlockMap()  # The map will be populated with the following function call.
    all_block = convert_lines_to_block(
            content.splitlines(), block_map, LinkStack(source_path), source_path)
    return all_block, block_map.get_variables()
146800
def link_href(self, rel):
        """"""
        link = self.link(rel)
        if (link is not None):
            link = link['href']
        return(link)