Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Generally, all the recent versions of Windows are supported. For more information, refer to the .NET 4.7.2 System Requirements at:

...

New elements are added to the taxonomy extension by using the builder's AddElementToTaxonomy method. Most elements are new concepts/metrics for which values can be reported. The following parameters must be passed when creating a new element.

Type & NameDescription
string id

The ID of the element.

The ID must be unique in the whole taxonomy set, i.e. no other element defined in the extension taxonomy and no other element in the base taxonomy can have the same ID. Therefore it is recommended to add a prefix to the extension element to avoid clashes with the base taxonomy. It must be a valid ID according to the XML standard, i.e. it must be an NCName.

string nameThe name of the element.
XmlQualifiedName typeName

The type of the value which can be reported for this element.

The value is an XML qualified name which resolves to a definition of the type. Use the attributes of the class TaxonomyExtensionBuilder to use common type definitions from the XBRL specifications, e.g. MonetaryItemType.

XmlQualifiedName substitutionGroup

The substitution group of the element, which defines the type of the element.

The value is an XML qualified name which resolves to a definition of the substitution group. Use the attributes of this class to use common substitution group definitions from the XBRL specifications, e.g. ItemSubstitutionGroup can be used for adding metrics.

bool isAbstract

Defines if the extension element is abstract. It is not possible to report values for abstract elements.

Abstract elements can be used for structuring the linkbases of the taxonomy, in which elements are grouped in hierarchies. Some elements, like dimensions and hypercubes, must always be abstract.

bool isNillableDefines if xsi:nil can be reported for the extension element.
Element.ElementBalanceType balanceTypeDefines the balance type of the extension element (credit, debit or unknown).

Element.ElementPeriodType periodType

Defines the period type of the extension element, which can be instant, duration or unknown:

  • Instant is used if the element is a metric which's value is measured in a specific point in time.
  • Duration is used if the element is a metric which's value describes a development over a period of time.
  • Unknown is used if no period attribute should be added to the element, e.g. if the element is not a metric but a dimension and hence does not need a period attribute.

Add Roles

Elements are grouped in roles. A role is a group of related elements, e.g. all elements used in a single table or chapter. A role could be "Changes in Equity" or "Property, plant and equipment". To add a new role type, use the builders' AddRoleType method, which takes the following arguments:

Type & NameDescription
string idThe ID of the new role.
string definitionA string describing the role.
string filenameThe name of the taxonomy extension XSD file.
string roleUri = nullThe role's URI. If no value is passed for this attribute, the default value is used, which is a concatination of the target namespace of the taxonomy, the string "/roles/"  and the ID of the role, e.g. "http://amana.com/xbrl/roles/ID".

Add links and linkbases

Roles can have multiple links. A link contains hierarchical relationships between elements in this role. There are different types of links and a role can have multiple types of links:

...

All links of the same type are defined within a linkbase. To create a link for a role, together with a linkbase, the method AddLinkbaseLinkWithRefs can be used, which takes the following arguments:

Type & NameDescription
XbrlRoleType roleTypeThe role for which a linkbase should be added.
XbrlLinkType linkTypeThe type of the linkbase.
BaseLinkbase linkbase = nullThe base linkbase in which the link will be added. If no value is passed, a new linkbase will be added.

Add Arcs

Links contain hierarchical relationships between elemens. A single relationship is defined by an arc. This arc defines a relationship between a from element (or parent element) and a to element (or child element). Based on the type of linkbase, a different type of arc is added to the linkbase and different attributes must be defined for the arc. To add an arc to an existing link, use the builder's AddArc method. This method takes the following arguments:

Type & NameDescription
ILInkbaseLink linkThe link to which an arc should be added.
Element fromElementThe arc's from element.
Element toElementThe arc's to element.
string arcRole

The type of relationship between the from and to element.

The value is an URI of an arcrole defined in the taxonomy. Use the constants defined in the class AMANA.XBRL.Engine.XbrlArcRoleConstants to use common arc roles defined by XBRL specifications.

decimal? order = null

The arc's order attribute which defines the order in which to elements with the same from element should be displayed/evaluated.

If there are multiple arcs with the same from element in a link, the children of the different arcs are ordered by the order. If the arc has no order, the default value 1 is assumed.

decimal weight = 1

The weight attribute must appear on calculation arcs. Calculation arcs defines which to elements sums up to a certain from element. The weight attribute defines a multiplicator which must be applied before adding it's value to the total sum (usually 1 or -1).

The XBRL specification defines constraints on valid values for the weight attribute based on the balance attribute of the from and the to element:

  • If the balance attribute of both elements is the same, the weight must not be negative.
  • If the balance attribute of both elements differ, the weight must not be positive.

If the arc is not a calculation arc, this parameter will be ignored.

bool closed = false

The closed attribute only appears on definition arcs. It can appear on arcs with the all arc role and arcs with the not all arc role for defining hypercubes:

  • If set to true, a fact's context must not contain any other dimensions beside the dimensions which are part of the hypercube to report a value for this hypercube.
  • If set to false, a fact's context can contain also other dimensions beide the dimensions which are part of the hypercube.

If the arc is not a definition arc, the value will be ignored.

string contextElement = null

The context element attribute only appears on definition arcs. It appears on arcs with the all arc role and arcs with the not all arc role for defining hypercubes. It defines which container of the context dimension information should be stored for reporting a value for this hypercube. The only valid values are "segment" and "scenario". For definition arcs which have neither all nor not all arc role, nothing should be passed.

If the arc is not a definition arc at all, the value will be ignored.

string preferredLabelRole = nullDefines the URI of the element's label which should be used when displaying the item in the relationship defined by the arc. The class AMANA.XBRL.Engine.XbrlBaseConstants defines URIs of common label roles.

Anchoring

For ESEF it is necessary to create anchors for extension elements. Anchors are references to elements defined in the ESEF taxonomy. There are two types of anchors: widers and narrowers. Wider anchors are used to link the extension element to an taxonomy element having the closest wider accouting meaning/scope. Narrower anchors are used to link extension elements to taxonomy elements having narrower accounting meaning/scope.

In the taxonomy extension those anchors are represented by arcs with a special arcrole. Those arcs can be added using the metod AddAnchoredDefinitionArc defined in the TaxonomyExtensionBuilder class. This method takes the following arguments:

Type & NameDescription
DefinitionLink linkThe link in which the anchor (arc) will be added.
Element anchorFrom

The arc's from element:

  • For wider anchors, this is the element already existing in the taxonomy.
  • For narrower anchors, this is the extension element.
Element anchorTo

The arc's to element:

  • For wider anchors, this is the extension element.
  • For narrower anchors, this is the element already existing in the taxonomy.
decimal orderThe arc's order attribute. If there are multiple arcs with the same from element, the order attribute defines the order in which the to elements should be displayed when using XBRL software.
string widerNarrowerCustomRoleUri = nullThe arc's arc role URI. If no value is provided, the value "http://www.esma.europa.eu/xbrl/esef/arcrole/wider-narrower" will be used as arc role URI, which is the arc role URI which should be used for anchoring arcs according to the ESEF reporting requirements.

Using TableModels to generate Tables from the Table Linkbase

...