Skip to content

Additional taxonomy processing

bseddon edited this page Nov 10, 2016 · 3 revisions

Once the link bases have been processed, there is further processing required for each role in the taxonomy. Each role of the presentation link base (now a hierarchy of nodes) needs further processing:

1) Assign hypercubes to presentation link base nodes

As this sounds, hypercubes are assigned to primary items in the presentation hierarchy. Of course there may be nested primary items with different hypercubes and all this needs to be taken into account.

As the nodes are processed, they are assigned a ‘nodeclass’ which identified the node as ‘simple’, ‘dimensional’ or ‘primaryitem’. This is useful when creating reports.

2) Prune assigned hypercubes

Removes all nodes that are flagged with the 'nodeclass' 'dimensional' as these are not useful for reporting purposes.

3) Create hierarchy paths

The final step processing the presentation hierarchy is to generate a 'paths' index for each node (see above). Performance is paramount but traversing a node hierarchy to find the right one to associate with instance element values is time consuming. Instead an array is created, indexed by the node label, the contents of which are the paths to the node containing the label. The same label may appear in nodes in different parts of the presentation hierarchy so the 'paths' array is an array of arrays.

'my_presentation_label' = array(
	'\part1\part2\my_presentation_label',
	'\part3\part7\my_presentation_label'
)

With this index, it is possible to iterate over the elements in an instance document and find the path(s) that denote where in a hierarchy, for example a presentation link base hierarchy, the value should appear. The identified path string can be parsed to create a set of parts that can allow reporting code to find the applicable nodes directly.

Creating this index does increase the size of the compiled taxonomy significantly but the benefit is a one-time action that has a dramatic effect on the performance of report creation.

Overriding the presentation linkbase

Sometimes the presentation linkbase contains errors or is incomplete. For example, in the UK GAAP taxonomy, the address line information in the Entity-Information or the list of third party roles in the General-Purpose-Contact-Information role is incorrect. The XBRL class includes the function 'getProxyPresentationNodes' function that can be overridden in descendent classes, such as XBRL_UK_GAAP to add and remove nodes and locators.

Clone this wiki locally