Home Analysis and system design XBRL: just about complicated – Chapter 6.Diving into XBRL – Part 5.New dimensions

XBRL: just about complicated – Chapter 6.Diving into XBRL – Part 5.New dimensions

by admin

6.5.New measurements

In the previous sections, we’ve made significant progress in representing the report form from our example as an XBRL report, but we still haven’t gotten a complete match.Today one of our developers had an epiphany: Let’s try XBRL Dimensions!

When looking at Chapter 5. it becomes apparent that genderand age groups can be represented as dimensions.

The basic taxonomy we have created so far has reached version sample-2006-01-05.xsd We will define domain members and templates in a separate taxonomy sample-2006-01-05-dimension.xsd

6.5.1 Basic concepts

As you might expect, we can simplify our taxonomy. The basic concept we need is nr_employees.. However, we will represent it in different measurement contexts, and we also need to report the total number of employees in a non-measurement context. For these purposes, we will define the concepts nr_employees_by_gender , nr_employees_by_age and nr_employees_total by specifying for them nr_employees as the value of the attribute substitutionGroup

<elementid="sample_nr_employees"name="nr_employees"xbrli:periodType="instant"type="xbrli:nonNegativeIntegerItemType"substitutionGroup="xbrli:item"nillable="true" /><elementid="sample_nr_employees_by_gender"name="nr_employees_by_gender"xbrli:periodType="instant"type="xbrli:nonNegativeIntegerItemType"substitutionGroup="sample:nr_employees"nillable="true" /><elementid="sample_nr_employees_by_age"name="nr_employees_by_age"xbrli:periodType="instant"type="xbrli:nonNegativeIntegerItemType"substitutionGroup="sample:nr_employees"nillable="true" /><elementid="sample_nr_employees_total"name="nr_employees_total"xbrli:periodType="instant"type="xbrli:nonNegativeIntegerItemType"substitutionGroup="sample:nr_employees"nillable="true" />

Facts about the number of employees will be presented in terms of several dimensions using different substitutions nr_employees for separating measurements (and presentations).

6.5.2. template taxonomy (template taxonomy)

Domain elements and the template taxonomy are combined into a common taxonomy schema. The template taxonomy imports several other schemas :

<importnamespace="http://www.xbrl.org/2003/instance"schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" /><importnamespace="http://xbrl.org/2005/xbrldt"schemaLocation="http://www.xbrl.org/2005/xbrldt-2005.xsd" /><importnamespace="http://xbrl.org/2006/xbrldi"schemaLocation="http://www.xbrl.org/2006/xbrldi-2006.xsd" /><importnamespace="http://www.sample.com/2006-01-05"schemaLocation="http://www.sample.com/2006-01-05/sample-2006-01-05.xsd" />

Scheme xbrldi is not used in the template taxonomy itself, but is used in the report, which in turn references the template taxonomy. To minimize the report’s dependence on the measurement module as much as possible, it is imported into the template taxonomy. Also, it references the underlying taxonomy to have a link to the concepts.

6.5.3 Typed measurement

As we know, there are two types of measurements, typed and explicit. In this section, we will look at how age groups can be represented as a typed dimension.

First of all, we need an element to define the type for age_group. We will use a simple type with an enumeration of valid values :

<elementid="sample_age_group_type"name="age_group_type"><simpleType><restriction base="string"><enumeration value=".. - 20" /><enumeration value="21 - 40" /><enumeration value="41 - .." /></restriction></simpleType></element>

With a type, we can define an age group measurement that refers to the type in its attribute typedDomainRef

<elementid="sample_dim_age_group"name="dim_age_group"substitutionGroup="xbrldt:dimensionItem"type="xbrli:stringItemType"abstract="true"xbrli:periodType="instant"xbrldt:typedDomainRef="#sample_age_group_type" />

Note that the element is abstract, which is a requirement. The value of the attribute substitutionGroup specifies xbrldt:dimensionItem

6.5.4 Explicit measurement

For a change, in this section we will show how to represent gender groups as an explicit dimension. This means that we must define a set of concepts for the elements of the dimension and, indeed, for the dimension itself.

<elementid="sample_dim_gender"name="dim_gender"substitutionGroup="xbrldt:dimensionItem"type="xbrli:stringItemType"abstract="true"xbrli:periodType="instant" /><elementid="sample_gender"name="gender"xbrli:periodType="instant"type="xbrli:stringItemType"substitutionGroup="xbrli:item"nillable="true" /><elementid="sample_male"name="male"xbrli:periodType="instant"type="xbrli:stringItemType"substitutionGroup="xbrli:item"nillable="true" /><elementid="sample_female"name="female"xbrli:periodType="instant"type="xbrli:stringItemType"substitutionGroup="xbrli:item"nillable="true" />

Note that the element with dimensionItem is abstract, which is a requirement. Concepts designed for dimension items have a value of substitutionGroup specifies xbrli:item Concept gender acts as the root of the hierarchy of dimension elements, the other concepts are elements of the domain.

Elements are placed in the hierarchy by relationships domain-member for which we create a definition linkbase. It uses a separate role for grouping relationships, and is included in the taxonomy schema.

<link:roleTyperoleURI="http://www.sample.com/genderDimension" id="genderDimension"><link:definition>Gender dimension for demographics on employees</link:definition><link:usedOn> link:definitionLink</link:usedOn></link:roleType><link:linkbaseRefxlink:type="simple"xlink:href="sample-2006-01-05-dimension-definition.xml"xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef"xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />

In the reference base we use the role and define concept locators in the usual way.

<roleRefxlink:type="simple"xlink:href="sample-2006-01-05-dimension.xsd#genderDimension"roleURI="http://www.sample.com/genderDimension" /><definitionLinkxlink:type="extended"xlink:role="http://www.sample.com/genderDimension" ><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_dimension_gender"xlink:label="dimension_gender" /><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_gender"xlink:label="domain_gender" /><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_male"xlink:label="member_male" /><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_female"xlink:label="member_female" /></definitionLink>

Measurement has a correlation dimension-domain with its domain. The elements of a domain are defined by the interrelationship domain-member between concept locators in the definition reference base.

<definitionArcxlink:type="arc"xlink:arcrole="http://www.xbrl.org/int/dim/arcrole/dimension-domain"xlink:from="dimension_gender"xlink:to="domain_gender"order="1" priority="0" use="optional" /><definitionArcxlink:type="arc"xlink:arcrole="http://www.xbrl.org/int/dim/arcrole/domain-member"xlink:from="domain_gender"xlink:to="member_male"order="1" priority="0" use="optional" /><definitionArcxlink:type="arc"xlink:arcrole="http://www.xbrl.org/int/dim/arcrole/domain-member"xlink:from="domain_gender"xlink:to="member_female"order="2" priority="0" use="optional" />

6.5.5 Hypercubes

Now that we have a basic taxonomy and a domain element taxonomy, we can combine them with hypercubes in the template taxonomy.

First, we define hypercube concepts as abstract elements with value hypercubeItem attribute substitutionGroup

<elementid="sample_hc_gender"name="hc_gender"xbrli:periodType="instant"type="xbrli:stringItemType"substitutionGroup="xbrli:hypercubeItem"nillable="true"abstract="true" /><elementid="sample_hc_age_group"name="hc_age_group"xbrli:periodType="instant"type="xbrli:stringItemType"substitutionGroup="xbrli:hypercubeItem"nillable="true"abstract="true" />

Creating links between basic concepts, hypercubes, and dimensions.

<locxlink:type="locator"xlink:href="sample-2006-01-05.xsd#sample_nr_employees_by_gender"xlink:label="primary_nr_employees_by_gender" /><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_hc_gender"xlink:label="hypercube_gender" /><definitionArcxlink:type="arc"xlink:arcrole="http://xbrl.org/int/dim/arcrole/all"xbrldt:contextElement="scenario"xlink:from="primary_nr_employees_by_gender"xlink:to="hypercube_gender"order="1" priority="0" use="optional" /><definitionArcxlink:type="arc"xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension"xlink:from="hypercube_gender"xlink:to="dimension_gender"order="1" priority="0" use="optional" />

Similarly for age groups :

<definitionLinkxlink:type="extended"xlink:role="http://www.sample.com/ageGroupDimension" ><locxlink:type="locator"xlink:href="sample-2006-01-05.xsd#sample_nr_employees_by_age"xlink:label="primary_nr_employees_by_age" /><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_hc_age_group"xlink:label="hypercube_age_group" /><locxlink:type="locator"xlink:href="sample-2006-01-05-dimension.xsd#sample_dim_age_group"xlink:label="dimension_age_group" /><definitionArcxlink:type="arc"xlink:arcrole="http://xbrl.org/int/dim/arcrole/all"xbrldt:contextElement="scenario"xlink:from="primary_nr_employees_by_age"xlink:to="hypercube_age_group"order="1" priority="0" use="optional" /><definitionArcxlink:type="arc"xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension"xlink:from="hypercube_age_group"xlink:to="dimension_age_group"order="1" priority="0" use="optional" /></definitionLink>

Note that the reference must use the role defined in the measurement taxonomy – ageGroupDimension :

<link:roleTyperoleURI="http://www.sample.com/ageGroupDimension" id="ageGroupDimension"><link:definition>Age group dimensionfor demographics on employees</link:definition><link:usedOn> link:definitionLink</link:usedOn></link:roleType>

6.5.6. Presentations

The presentation and label reference bases are similar to the ones we looked at earlier, we won’t repeat them here.

6.5.7 Report

Now that our measurement taxonomy is ready, we can make a report associated with it. First, let’s define contexts for the total number of employees at the beginning and end of the reporting period.

<context id="c_start"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-01-01</instant></period></context><context id="c_end"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-12-31</instant></period></context>

Next, let’s define contexts for the values of the age group measure.

<context id="c_start_age_up_to_20"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-01-01</instant></period><scenario><xbrldi:typedMemberdimension="sd:dim_age_group"><sd:age_group_type> .. - 20</sd:age_group_type></xbrldi:typedMember></scenario></context><context id="c_end_age_up_to_20"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-12-31</instant></period><scenario><xbrldi:typedMember dimension="sd:dim_age_group"><sd:age_group_type> .. - 20</sd:age_group_type></xbrldi:typedMember></scenario></context><context id="c_start_age_21_to_40"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-01-01</instant></period><scenario><xbrldi:typedMember dimension="sd:dim_age_group"><sd:age_group_type> 21 - 40</sd:age_group_type></xbrldi:typedMember></scenario></context><context id="c_end_age_21_to_40"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-12-31</instant></period><scenario><xbrldi:typedMember dimension="sd:dim_age_group"><sd:age_group_type> 21 - 40</sd:age_group_type></xbrldi:typedMember></scenario></context><context id="c_start_age_41_and_up"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-01-01</instant></period><scenario><xbrldi:typedMember dimension="sd:dim_age_group"><sd:age_group_type> 41 - ..</sd:age_group_type></xbrldi:typedMember></scenario></context><context id="c_end_age_41_and_up"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-12-31</instant></period><scenario><xbrldi:typedMember dimension="sd:dim_age_group"><sd:age_group_type> 41 - ..</sd:age_group_type></xbrldi:typedMember></scenario></context>

The change is specified in the attribute dimension of the element xbrldi:typedMember The value of the dimension is defined as the element sd:age_group_type – of the type defined for the measurement.

Now define contexts for the values of the gender dimension.

<context id="c_start_gm"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-01-01</instant></period><scenario><xbrldi:explicitMemberdimension="sd:dim_gender"> sd:male</xbrldi:explicitMember></scenario></context><context id="c_end_gm"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-12-31</instant></period><scenario><xbrldi:explicitMember dimension="sd:dim_gender"> sd:male</xbrldi:explicitMember></scenario></context><context id="c_start_gf"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-01-01</instant></period><scenario><xbrldi:explicitMember dimension="sd:dim_gender"> sd:female</xbrldi:explicitMember></scenario></context><context id="c_end_gf"><entity><identifier scheme="http://www.statistics.org"> 12-34567</identifier></entity><period><instant> 2005-12-31</instant></period><scenario><xbrldi:explicitMember dimension="sd:dim_gender"> sd:female</xbrldi:explicitMember></scenario></context>

The change is specified in the attribute dimension of the element xbrldi:explicitMember The value of a dimension is defined by a reference to a dimension domain element.

Note that the report refers to the template taxonomy, not the base taxonomy.

<link:schemaRefxlink:type="simple"xlink:href="http://www.sample.com/2006-01-05/sample-2006-01-05-dimension.xsd" />

Now we can pass on the facts, each in its own context.

<!-- Totals in contexts without dimensions --><s:nr_employees_totalcontextRef="c_start"unitRef="u_person"decimals="0"> 35</s:nr_employees_total><s:nr_employees_totalcontextRef="c_end"unitRef="u_person"decimals="0"> 41</s:nr_employees_total><!-- Gender Demographics --><s:nr_employees_by_gendercontextRef="c_start_gm"unitRef="u_person"decimals="0"> 23</s:nr_employees_by_gender><s:nr_employees_by_gendercontextRef="c_end_gm"unitRef="u_person"decimals="0"> 27</s:nr_employees_by_gender><s:nr_employees_by_gendercontextRef="c_start_gf"unitRef="u_person"decimals="0"> 12</s:nr_employees_by_gender><s:nr_employees_by_gendercontextRef="c_end_gf"unitRef="u_person"decimals="0"> 15</s:nr_employees_by_gender><!-- Age Demographics --><s:nr_employees_by_agecontextRef="c_start_age_up_to_20"unitRef="u_person"decimals="0"> 5</s:nr_employees_by_age><s:nr_employees_by_agecontextRef="c_end_age_up_to_20"unitRef="u_person"decimals="0"> 9</s:nr_employees_by_age><s:nr_employees_by_agecontextRef="c_start_age_21_to_40"unitRef="u_person"decimals="0"> 23</s:nr_employees_by_age><s:nr_employees_by_agecontextRef="c_end_age_21_to_40"unitRef="u_person"decimals="0"> 21</s:nr_employees_by_age><s:nr_employees_by_agecontextRef="c_start_age_41_and_up"unitRef="u_person"decimals="0"> 7</s:nr_employees_by_age><s:nr_employees_by_agecontextRef="c_end_age_41_and_up"unitRef="u_person"decimals="0"> 11</s:nr_employees_by_age>

6.5.8 First look at new measurements

Our simple report visualization application does not support measurements, so the report looks like this :

XBRL: just about complicated - Chapter 6.Diving into XBRL - Part 5.New dimensions

After some manual adjustments-removing unused columns, arranging the remaining columns, and adding table headers-we can look at a slightly better version of the report that you might expect from a measurement-enabled application :

XBRL: just about complicated - Chapter 6.Diving into XBRL - Part 5.New dimensions


Navigation by chapters

  • P.S. from the translator
  • You may also like