next up previous contents index
Next: GPD Maps Up: AUTOLINKS Previous: How To Setup

Autolinking Syntax

Each autolink is defined by specifying the name under which the link should be put in the new object (here called `new object') , and the path to the object to which the link should go (here called `link object').

The root node of the composition in which the new item being created is going to be included can be referred to as `%SELF%'.

For example, the folder GPD contains an autolink for `item' with the following specification:

FOLDER ``Item.from'' = %SELF%

Therefore each new `item' created within a folder will get a link with group tag FOLDER and field tag ``Item.from'' (excluding the double-quotes) to the folder object. This link is set in an item object only when it is created within the folder and not, for instance, when it is moved from another folder.

Additionally, any object reachable from the root by following links can be specified as a link object. The specification is a chain of links separated by ``+''. Each link in the given chain is either:

  1. a group tag, field tag, and a position index,

  2. a group tag and field tag, with a default index of 1,

  3. a group tag, using the field tag on the left side of the ``='' and an index of 1, or

  4. nothing after the ``='', in which the group and field tags are taken from the left side and the index is the default of 1.

If you have multiple autolinking directives for one object, they are separated by a `;' (semicolon).

We will now give examples of each of these:

folder
          BACKLINKS Author = INHERIT Author  2

This autolink would create in every new folder a link called ``BACKLINKS Author'' and link in INHERIT:Author:2 as found from the composition root.

folder 
         BACKLINKS Author = INHERIT Author

would behave in the same way, but would link to INHERIT:Author:1, since 1 is the default index.

folder
         BACKLINKS Author  = INHERIT

is exactly equivalent to the predecessor, since Author will be taken from the left side.

folder
         BACKLINKS Author  =

will create a link called BACKLINKS Author to the object found in the link BACKLINKS:Author:1 in the composition root. Both BACKLINKS and Author are taken as defaults.

folder
         BACKLINKS Author = INHERIT Author 2 + CHILD Tom

will create a link called BACKLINKS Author to the object found by following the second link in the INHERIT Author link group and following the link CHILD Tom 1 from that object. You can have as many ``+'' chains as you want, but you must specify the group and field tags for all of the chains. You can leave the last chain empty (between the last ``+'' and the ``;'') in which case the last group and field tag names will be used.

Figures 7.28, 7.29, and 7.30 show autolinking examples from GPD's on the system.

  
Figure: AUTOLINKS in `gpdmap' GPD

  
Figure: AUTOLINKS in `document overview' GPD

 


:  AUTOLINKS from a demo GPD



next up previous contents index
Next: GPD Maps Up: AUTOLINKS Previous: How To Setup



Martin Sjolin
Mon May 29 19:53:45 MET DST 1995