Skip to content

Processing linkbases

bseddon edited this page Nov 10, 2016 · 1 revision

All the steps of the compilation process are in some sense important but the key steps are the those to process the linkbases. This is because in XBRL the linkbases provide the structure for an XBRL taxonomy. The schema file (.xsd) references other taxonomies, linkbases and will contain lists of components used by the taxonomy which are defined as 'elements'.

But linkbases are where the structure of these elements are described. The labels linkbase is the source of labels that describe elements. The presentation linkbase represents a description by the taxonomy author of how the elements relate to one another and, so, how they might appear in a report. The definition linkbase is used to assign hypercubes and related dimensions and their members to an element of the schema (the hypercubes, dimensions, default and members themselves are all also elements within the schema.

The processing of all linkbases have common themes. All identify the roles used by the linkbase - there maybe only one - and then, for each role, process the locators and arcs. Locators represent nodes and arcs describe how the nodes are related. Arcs also describe any properties that one node has with respect to the other.

Each linkbase has slightly different processing semantics. For example, locators and arcs of definition linkbases form one or more hierarchies linking a hypercube with its members, called primary items, and with the dimensions and their members. Labels are not formed into a hierarchy but instead link to elements to which a label applies. However, because XBRL linkbases use the XML xlink specification all have some processing in common.

**Presentation linkbase**

Each role is identified and for each role the locators and arcs are used to create one or more hierarchies. If used, presentation roles break the presentation into meaningful sections. In an accounting taxonomy these might be "Balance Sheet", "Income Statement" and "Cashflow".

As the locators and arcs are processed, nodes are created. Nodes representing information from a presentation linkbase have child nodes and in this way nodes can be formed into a hierarchy.

The end result of processing the presentation linkbase information is an array. The array is a property of the XBRL class called '$presentationRoleRefs'. The members of this array are the roles defined for the linkbase and the index in the array is the name of the role. Each member is an array and member array has elements with the same names:

Key Comment
type The type of the role ref: simple|extended.
href An id within the taxonomy for the corresponding roleType (roleTypes are held in the XBRL class)
roleUri Assigned by the taxonomy author to give the roleRef a unique id
hierarchy A node hierarchy created from an analysis of locators and presentation link elements in the linkbase
hypercubes A list of hypercubes assigned to primary items elements that appear in this role ref
locators An array indexed by ‘label’ that stores the href of the label which a reference to the element within the taxonomy schema document
paths Paths are created to be an important index to the hierarchy.
**Definition linkbase**

Again, for each role ref the locators are indexed by label and reference the locator href. Resolving the locators in a definition linkbase is slightly more complex because locator references may be in other taxonomies.

As the locators and arcs are processed, nodes are created. Nodes representing information from a definition linkbase have child nodes and in this way nodes can be formed into a hierarchy.

The end result of processing the definition linkbase information is an array. The array is a property of the XBRL class called '$definitionRoleRefs'. The members of this array are the roles defined for the linkbase and the index in the array is the name of the role. Each member is an array and member array has elements with the same names:

Key Comment
type The type of the role ref: simple|extended.
href An id within the taxonomy for the corresponding roleType (roleTypes are held in the XBRL class)
roleUri Assigned by the taxonomy author to give the roleRef a unique id
hierarchy A node hierarchy created from an analysis of locators and presentation link elements in the linkbase
hypercubes A list of hypercubes assigned to primary items elements that appear in this role ref
locators An array indexed by ‘label’ that stores the href of the label which a reference to the element within the taxonomy schema document
dimensions A list of the dimensions in this role ref
members A list of the members in this role ref
primaryitems A list of the primaryitems in this role ref
paths Paths are created to be an important index to the hierarchy.
Clone this wiki locally