http://www.w3.org/1999/XSL/Transform

c.xlink ([target : xlink], method : string, [name : string, value : string]*) : xlink

The method “xlink” serves for forming a method link with parameters. The result of this method is supported by a great number of further methods. An XLink consists of the following elements:

  1. Object link within any data source
  2. Target method
  3. Any number of parameters

An xlink or a method name can be specified as parameters. The method name is optional if an xlink is specified without further parameters (name, value).

<xsl:value-of select="c.xlink('onion://data/objects/100', 'teaser')" />
<xsl:value-of select="c.xlink('onion://data/objects/100', 'teaser', 'language', 'de', 'mode', 'large')" />
Formation of XLinks

The first example creates a reference to an onion resource with the ID 100 and the method “teaser”:

onion://data/objects/100#teaser

The second example adds the parameters "language" and "mode".

onion://data/objects/100#teaser?language=de&mode=large

The method “xlink” makes it possible to form a new XLink on the basis of an existing one. It is possible to extend or change an existing XLink in this way. The following example overwrites the parameter “mode” and supplements the XLink with the parameter “border”.

<xsl:variable name="xlink" select="c.xlink('onion://data/objects/100', 'teaser','language', 'de', 'mode', 'large')" />
<xsl:value-of select="c.xlink($xlink, '', 'mode', 'small', 'border', 'yes')" />
Modifying an existing XLink

The example leads to the following result:

onion://data/objects/100#teaser?border=yes&language=de&mode=small

The existing method “teaser” was kept in this example by transferring an empty character string.

Parameters can either be added or changed, but no parameters can be removed.