summaryrefslogtreecommitdiff
path: root/doc/yelp-xsl/C/mal.link.target.page
blob: d102ed451b737199aeaa54cd18db8a7e08b6cf0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/" id="mal.link.target" type="topic" style="xslt-template"><info><link type="guide" xref="mal-link" group="templates"/><link type="guide" xref="templates" group="mal"/><revision version="3.28" date="2017-08-11" status="final"/><desc>Output the target URL for a <code>link</code> or other linking element.</desc></info><title>mal.link.target</title><p>Output the target URL for a <code>link</code> or other linking element.</p>
  
  
  <synopsis><title>Parameters</title><terms>
    <item>
      <title><code>node</code></title>
      <p>The <code>link</code> or other element creating the link.</p>
    </item>
    <item>
      <title><code>action</code></title>
      <p>The <code>action</code> attribute of <code style="xslt-param">node</code>.</p>
    </item>
    <item>
      <title><code>xref</code></title>
      <p>The <code>xref</code> attribute of <code style="xslt-param">node</code>.</p>
    </item>
    <item>
      <title><code>href</code></title>
      <p>The <code>href</code> attribute of <code style="xslt-param">node</code>.</p>
    </item>
  </terms></synopsis>
  <p>This template outputs a URL for a <code>link</code> element or another element using linking attributes.  If <code style="xslt-param">xref</code> points to a valid page or section, it uses a file name based on the ID of the target page plus <code style="xslt-param" xref="mal.link.extension">mal.link.extension</code>. Otherwise, the link will point to <code style="xslt-param">href</code>.</p>
  <p>For inline links, <code style="xslt-param">node</code> should be the <code>link</code> element. For links from a <code>links</code> element, <code style="xslt-param">node</code> should be that <code>links</code> element, or the containing element when the <code>links</code> element is implicit.</p>
  <p>This template first calls <code style="xslt-template" xref="mal.link.target.custom">mal.link.target.custom</code> with the same arguments. If that template returns a non-empty string, it is used as the return value, overriding any other behavior of this template.</p>
  <p>If <code style="xslt-param">xref</code> contains a <code>/</code> or <code>:</code> character, this template calls <code style="xslt-template" xref="mal.link.target.extended">mal.link.target.extended</code>, which by default just uses <code style="xslt-param">href</code> instead. Override that template to provide extended xref behavior.</p>
<list style="compact"><title>Calls Templates</title><item><p><link xref="mal.link.target.custom"/></p></item></list></page>