Back to the index
| next |
Context equality and the dimensions specification
Published on 11/10/2006
Overview
The new Dimensions specification highlights a significant weakness in the original XBRL specification affecting the comparability of facts in XBRL instances.
In the evolution from XBRL 2.0 to XBRL 2.1 a lot of additional detail was introduced to tie down what is required for two facts to have equal contexts. This made some sense for those aspects of contexts that were also fully tied down, such as the markup used to document the identifier of the entity being reported on and the markup used to document the period that a fact describes. However, contexts have not been fully tied down in the XBRL 2.1 specification and this causes problems.
Two components of the context have been left more or less unspecified by the XBRL specification. These were the segment and the scenario. The segment is an optional component of the entity description and it can have any children elements at all. The scenario is an option description of the reporting scenario. It too can contain any number of child elements.
Specification of meaning of the segment and the scenario is left as the responsibility of those creating XBRL instances. However, the decision to completely document the notion of context equality meant that even while remaining quiet on what the content of a segment or scenario means, the XBRL 2.1 specification was going to take steps toward interpretation of segments and scenarios. This has become quite a sticking point for extension specifications trying to put more structure around the interpretation of scenarios and segments.
Contextual equivalence
In the XBRL 2.1 specification, the definition of contextual equivalence is expressed in terms of s-equality of elements. Two elements are s-equal if they are not identical, they have the same namespaces and local names, the same attributes, each with the same value, and s-equal sequences of child element and text nodes. Two sequences of element and text nodes are s-equal if every node in one sequence is s-equal to the node in the same position in the other sequence.
That is quite a mouthful but it boils down to saying that the content for one scenario (segment) has to be a mirror image of the content of another scenario (segment).
Consequences
This definition of contextual equivalence means that if QNames are used as content of an attribute or text node in a scenario or segment then contextual equivalence cannot be guaranteed in instances, just because different namespace prefixes can be tied to the one namespace. This does not change the information content of the QName but it does prevent detection of equivalent contexts.
Similarly, this definition of contextual equality implies that the ordering of the child nodes of a segment or scenario is pertinent and so scenarios or segments with different orderings of their children are not identified as being contextually equivalent by XBRL 2.1 implementations. Yet with so little information in the XBRL 2.1 specification about how to use scenarios and segments this content ordering requirement can become quite a barrier to performing what would otherwise be meaningful comparisons.
Real world implications
The discussion above seems pretty theoretical but it has had direct implications for the dimensions specification.
The dimensions specification makes extensive use of QNames in scenarios and segments. It also gives the ordering of child elements of scenarios and segments no informational content and imposes no strict ordering over all dimensions that can be defined for use as child elements of scenarios and segments.
The issue of content ordering has been swept to the side in the dimensions specification by a statement that if c-equality matters to a user, then the instance being considered should be modified so that the dimensions do follow a strict ordering (that can be chosen by the user).
The issue of QNames has been trickier to work around. In the dimensions specification the bold step was taken to define a new notion of dimensional equality. This is a partial substitute for the XBRL 2.1 notion of context equality by providing a definition of the information contained in segment and scenario elements and thus by providing rules for establishing equivalence of that information. Unfortunately, the processing of calculation relationships in the XBRL 2.1 specification is based upon context equality rather than dimensional equality. This means that instance documents also need to be modified to ensure that all namespaces used for dimensions have unique prefixes.
| next |