Copyright ©2011-2012 XBRL International Inc., All Rights Reserved.
Circulation of this Public Working Draft is unrestricted. Other documents may supersede this document. Recipients are invited to submit comments to versioning-feedback@xbrl.org, and to submit notification of any relevant patent rights of which they are aware and provide supporting documentation.
1 Introduction
2 Technical "Diffing"
3 Creating XML Snippets
3.1 Namespaces - Rename
3.2 Namespace - Merge
3.3 Namespace - Split
3.4 Concept - Add
3.5 Concept - Delete
3.6 Concept - Rename
3.7 Concept - Change
3.8 Concept - Change - @id
3.9 Concept - Change - @type
3.10 Concept - Change - @substitutionGroup
3.11 Concept - Change - @default
3.12 Concept - Change - @nillable
3.13 Concept - Change - @abstract
3.14 Concept - Change - @block
3.15 Concept - Change - @fixed
3.16 Concept - Change - @final
3.17 Concept - Change - @xbrli:periodType
3.18 Concept - Change - Attribute - Add
3.19 Concept - Change - Attribute - Delete
3.20 Concept - Change - Attribute - Change
3.21 Concept - Change - Attribute - Tuple content
3.22 Concept - Label - Add
3.23 Concept - Label - Delete
3.24 Concept - Label - Change
3.25 Concept - Reference - Add
3.26 Concept - Reference - Delete
3.27 Concept - Reference - Change
3.28 Presentation relationship - Add Child
3.29 Presentation relationship - Delete Child
3.30 Presentation relationship - Add Parent and Children
3.31 Presentation relationship - Delete Parent and Children
3.32 Presentation relationship - Add Parent and Siblings
3.33 Presentation relationship - Delete Parent and Siblings
3.34 Presentation relationship - Add linkrole
3.35 Presentation relationship - Delete linkrole
3.36 Presentation relationship - Change @preferredLabel
content
3.37 Presentation relationship - Change @order
content
3.38 Presentation relationship - Change @linkrole
content
3.39 Presentation relationship - Change @arcrole
content
3.40 Calculation relationships - See Presentation Relationship Events
3.41 Calculation relationships - Change @weight
content
3.42 Non XDT Definition Relationships - See Presentation Relationship Events
3.43 XDT Definition Relationships through the Aspects Module - Not Stable Yet
4 Grouping Changes in Business Events
4.1 Assignments
4.2 Actions
5 Extending the Result with Business Reasons
6 The Potential Use of the Versioning Report
A Document history (non-normative)
B Errata corrections in this document
This document describes the process of creating an XBRL Versioning report according to the XBRL Versioning Specification of March 2011. It assumes two versions of a DTS that need to be versioned. The various stages are:
Both versions of the DTS are targeted through an entrypoint. An entrypoint is a schema that is used to discover the DTS.
The discovery MAY leave certain concepts and relationships that are supplied as part of the DTS uncovered.
e.g. concepts that are present in any discovered schema but are not included in any dimensional space, or linkbases
that are not targeted by any <link:linkbaseRef>
or linkroles that are not targeted by any @xbrldt:targetRole
.
The XBRL Versioning report is aimed at business users so it is only about concepts and relationships that are discovered through the entrypoint.
Everything else present in the schemas and linkbases is considered waste and doesn’t need to be reported. No NEED to be reported means it CAN be,
because the specification allows for any and all to be reported. There is no mandate on reporting any changes, which means the receiver
of the versioning report cannot rely on the versioning report to be a complete index to all the changes between two DTSes.
The first step is to discover two DTSes by one or more namespaces that are the
targetNamespace of the entrypoints supplied. If the namespaces in the from and to
DTS are equal the software should differentiate them by location. The versioning
report holds relative paths to Xpointer expressions to the @id
on XML
nodes not being addressed by a QName. If both namespaces have the same
namespace prefix, they must be made unique by the software. Discovery follows the
principles of the XBRL discovery mechanism.
For any "set" of namespaces in the <ver:fromDTS>
and
<ver:toDTS>
a <ver:namespaceRename>
event is created. This can
leave certain namespaces on both the from and to DTS uncalled for. This MAY imply
a delete (or add) of the namespace as a whole. Every XML fragment of the
<ver:fromDTS>
is matched against the XML fragments of the
<ver:toDTS>
. If the same QName is found on both DTSes, it is a match. For
relationships the linkrole, link element and arc labels are considered when finding a
match. For resources, linkrole, link element, arc labels and the resource content are
considered when finding a match. .
For non matches extra matching has to be done; for concepts the attributes and content model (for tuples) are matched. For relationships the attributes on the locator, arc and resource are evaluated. Resource content is not evaluated to other resource content; this Versioning module is not (yet) available.
The base framework of the Versioning Report
Here are all the events covered by the XII Versioning specification that may be needed to have a complete and explicit report.
Note: Namespace merges are derived from the fact that multiple <ver:namespaceRename>
events have the same content on the <ver:toURI>
element.
Note: Namespace splits are derived from the fact that multiple <ver:namespaceRename>
events have the same content on the <ver:fromURI>
element.
Note: Upon a <vercb:conceptAdd>
event no other events on this concept are being created, that includes all possible relations to other concepts.
Note: Upon a <vercb:conceptDelete>
event no other events on this concept are necessary, that includes all possible relations to other concepts.
Note 2: Upon removal of the concept all the attached relationships and its possible appearance as child in a content model,
MUST be removed also to prevent an invalid DTS. No claim has been made in the specification as to how 'deep' the relationships should be removed (chaining).
To prevent misunderstanding the user's intention it is preferable to have a
conceptDelete
event accompanied by a relationshipSetDelete
event where the level of removal can be specified,
if the concept has relations other than labels and references.
Note: Technically it is possible to rename a concept AND change all of its attributes and relationships and their content.
Obviously this should be a conceptDelete
followed by a conceptAdd
.
There is no limit set on what can also be changed when a conceptRename
is being used (eg. a labelChange
would be likely to occur too).
This event does not exist on its own. It is expressed as a number of smaller events that handle all the possible attributes that can be placed on a concept.
These events are about the content and FUNCTIONAL presence of the attributes on a concept.
This means that the addition of @xbrli:balance
on a concept is considered viable in <verce:conceptBalanceChange>
as is the change of the
@xbrli:periodType
value from instant to duration in the <verce:conceptPeriodTypeChange>
event.
On these type of events the QName of <vercb:fromConcept>
and <vercb:toConcept>
MUST be the same to avoid a combination of events
(like: conceptRename
and conceptTypeChang
e). Two namespaces that are declared as <ver:namespaceRename>
event are considered to be equal.
The multiple change event also covers addition or deletion from the attribute on the concept, however, attributes that have a default value
(like @abstract
) and are made explicit in the schema are NOT considered a change.
@id
Note: This event will always be present if FRTA naming conventions
are followed and the @name
of a concept is being changed.
Note 2: Since the @id
on concepts plays no business role, this will always be a technical event.
@type
Note: Details of the @type
change, like facets, are not explicitly communicated and need to be discovered by the software.
Note 2: Since Since @type
changes could be for both business and technical reasons,
the assignment reference is the only indicator (apart from the generic label content) for software to determine its impact.
@substitutionGroup
Note: Details of the @substitutionGroup
change, like new attributes, are not explicitly communicated and need to be discovered by the software.
Note 2: This change event is about the actual content of the @substitutionGroup
not about the derived construction of the resolved QName.
@nillable
A change from the value true
to not stating the attribute on the concept at all (or vice versa) is NOT considered a
change since true
is the default value for this attribute.
@abstract
A change from the value false
to not stating the attribute on the concept at all (or vice versa) is NOT considered a
change since false
is the default value for this attribute.
@block
The @block
attribute is a technical construction concerning extension and restriction.
The <ver:assignmnetRef>
will always therefore be technical
.
@final
The @final
attribute is a technical construction concerning extension and restriction.
The <ver:assignmnetRef>
will always therefore be technical
.
@xbrli:periodType
The @xbrli:periodType
attribute is a construction concerning instant and duration.
The <ver:assignmnetRef>
will always therefore be business
.
Note: This event MUST NOT be used to add attributes in the xs
, xbrli
, or xbrldt
namespace.
Note: This event MUST NOT be used to delete attributes in the xs
, xbrli
, or xbrldt
namespace.
Note: This event MUST NOT be used to change attributes in the xs
, xbrli
, or xbrldt
namespace.
Note 2: The attribute QName on the <verce:customAttribute>
MUST be the same to avoid combination of events.
Two namespaces that are declared as <ver:namespaceRename>
event are considered to be equal.
Note: The attribute QName on the <vercb:fromConcept>
and <vercb:toConcept>
MUST be the same to avoid combination of events.
Two namespaces that are declared as <ver:namespaceRename>
event are considered to be equal.
Note 2: All content of the complexType (tuple) is communicated with this single event: attributes, element nodes, @minOccurs
- or @maxOccurs
,
the use of xs:choice
etc. Everything that can appear in the content model.
This also applies to changes to grandchildren or even further down in the nesting hierarchy. Software needs to discover the specific changes.
Note: This is the effective business event of adding a label to a concept. There is no indication for the linkrole. The software needs to discover this for itself.
Note 2: This particular label resource was addressed through the @id
. For resources that do not have @id
s
the traditional approach of using an element scheme pointer such as (1/10/2) (i.e. 2nd child of 10th child of the root) is recommended.
Note 3: The resources are addressed using the full (relative) path from the perspective of the versioning report. Absolute paths are preferred.
Note: There is no indication what has been changed on the resource: the @xlink:role
, @xml:lang
or the resource content itself.
The software needs to discover this for itself.
Note 2: From this example can be deduced that the @id
on resources is especially important in identifying the resource attributes and content.
It is not appropriate to 'copy' @xlink:label
and treat it as a piece of text. The resource must be treated like a concept.
Note 3: There is no @id
change event defined in the XII Versioning specification.
This leads to the practice that a change in the @id
resource content MUST be treated as a delete and add event.
The consequences of having naming conventions on the @id
will hamper versioning.
Renaming will lead to different @id
s whereas the content has not changed at all.
This leads to the recommendation to have the @id
's value unique and stable during the lifespan of the DTS.
Note: This is the effective business event of adding a reference to a concept. There is no indication of the linkrole in which the reference is placed. The software needs to discover this for itself.
Note 2: This particular reference resource was addressed through the @id
.
For resources that do not have @id
s the traditional approach of using an element scheme pointer such as (1/10/2) (i.e. 2nd child of 10th child of the root)
is recommended.
Note 3: The resources are addressed using the full (relative) path from the perspective of the versioning report. Absolute paths are preferred.
Note: There is no indication what has been changed on the resource: the @xlink:role
or the resource content itself. The software needs to discover this for itself.
Note 2: From this example can be deduced that the @id
on resources is especially important in identifying the resource attributes and content.
It is not appropriate to 'copy' @xlink:label
and treat it as a piece of text. The resource must be treated like a concept.
Note 3: There is no @id
change event defined in the XII Versioning specification.
This leads to the practice that a change in the @id
resource content MUST be treated as a delete and add event.
The consequences of having naming conventions on the @id
will hamper versioning.
Renaming will lead to different @id
s whereas the content has not changed at all.
This leads to the recommendation to have the @id
's value unique and stable during the lifespan of the DTS.
Add single child to existing parent linkrole
Note: No linkbase is being defined. If the same linkrole is used in multiple linkbases there is a problem to express that the addition needs to be placed in a specific linkbase, which is of no use to the mapper or reporter. It is only of interest to the DTS extender.
Note 2: The @order
, @preferredLabel
and optional custom attributes on the arc must be detected by the software.
Note 3: If the added child is already present as parent in any presentationArc
of the same linkrole there may be consequences for the nesting in the tree.
Delete single child from existing parent linkrole
Note: This event is the result of effectively not having the relationship between the parent and child.
That could be the result of using @use='prohibited'
or adding a similar relationship with a higher @priority
or physically removing the relationship arc from the linkrole..
Note 2: If the deleted child already has presentationArc
s in which it is the parent in the same linkrole there may be consequences for the nesting in the tree.
Add a parent with all its children in existing linkrole
Note: If the added child is already present as parent in any presentationArc
of the same linkrole there may be consequences for the nesting in the tree.
Delete a parent with all its children from existing linkrole
Note: If the deleted child already has presentationArc
s in which it is the parent in the same linkrole there may be consequences for the nesting in the tree.
Add a parent with all its siblings in existing linkrole
Delete a parent with all its siblings from existing linkrole
Add a linkrole with all its content
Note: There is no add linkrole event without any relationships as content because there would be no business use for such an event.
Delete a linkrole with all its content
@preferredLabel
contentCalculationship relationchanges are covered in the same way presentation relationships are. For examples please see the appropriate presentation relationship change.
@weight
content
Note: It could be argued that explicit mention of the @weight
is unnecessary because the discovery mechanisms should be able to detect the change.
However, other fragments may also be changed and it is better to be explicit than implicit.
Note 2: Although allowed by the specification, combining multiple changes on the same relationship, such as the @weight
and some custom attribute,
is NOT advisable, even if it is just for connecting specific business reasons through generic labels.
A change to the DTS (if communicated in the versioning report) is always placed within a <ver:action>
> element.
These actions CAN express business reasons for making the change. The only way to express the reason is through a generic label or
reference that is linked to the @id
on the action.
If a number of changes are all executed for the same reason the versioning report creator has two options for grouping the change events:
assign all the change events into the same action or create multiple actions and refer those action to a single <ver:assignment>
where the generic label is attached explaining the reason for the change(s).
An assignment is the top level of a reason why a change has been made.
Three predefined types are available: business, technical and errata.
The first two speak for themselves.
The errata is for everything that doesn't fit the first two assignment types. Every <ver:action>
MUST be connected to
a <ver:assignment>
. The assignment carries the type and an @id
which points to free text explaining the assignment.
There is no further structured content.
Technically it is allowed to have a single <ver:action>
refer to multiple <ver:assignment>
s.
There is no limit to the number of assignments or actions, they just need unique @id
s to enable connecting to generic labels and/or references.
But from a business perspective this can be confusing.
A construct that has been found to work very effectively is as follows:
namespaceRename
);Note: a consideration for assigning multiple assignments to a single action MAY be the different target groups the report is intended for.
Actions are sometimes used as container to group events that derive meaning from each other: conceptMerge
and conceptSplit
.
Mostly the actions are derived from the assignment. If the assignment is to change DTS content to reflect new reporting rules, a project is being formed.
It is at the preference of the manager of the DTS as to how he tackles the task: work concept by concept changing everything that is needed, or working by DTS artefact:
change all data types first, than all labels, then ... etc.
From this approach the reasons are derived that need to group all the events (excluding the conceptMerge
and conceptSplit
events).
The business reasons for making the changes in the DTS are always communicated in a generic label linkbase.
If needed it also possible to use generic references if the reasons are available in a structured manner in another location.
For external unstructured business reasons there is a separate element available in the versioning report: <ver:reportRef>
.
Business reasons can vary greatly from very abstract "law change" to very specific "balance attribute on item X has been set to 'debit'". It is the DTS author's choice as to what is needed for their audience (extender, mapper, reporter) and what suits their needs.
Versioning reports do not have a standardized way of being presented or processed (yet). Still the results could be of great use to software vendors that support a mapping table in which their in house elements are mapped against the elements from a DTS. The versioning report could drive an automated upgrade of this mapping table when individual events are being determined as being without any consequences that need evaluation by business users. Equally the versioning report can help business users understand the changes in the DTS if the report is handled by software that creates a presentable layout for the business user.
Although versioning reports are not specifically designed to support any kind of migration of instances, some of the reported events may enable 'auto-adjustment' of the facts. Especially concept and namespace renames could easily be applied to an instance, migrating the content to the new version of DTS.
Another use, which is not advocated but still may receive some attention, is the migration of a DTS that is stored in a local format. For extenders that use a DTS that has been migrated to an internal relational database representation, the versioning report can support migration of this internal representation.
In all of these use cases there is a clear understanding needed of what the versioning report author is actually including (and equally important: what he is NOT including) in the report, and what the report consumers need to create a smooth transition between two versions of a DTS. it is important for both parties to discuss the opportunities that this structured way of communicating changes in a DTS offers them to achieve a common understanding.
Date | Author | Details |
---|---|---|
18 May 2011 | Roland Hommes |
First (PDF) version. |
20 September 2011 | Hugh Wallis |
Converted to S4S with some minor editorial changes |
This appendix contains a list of the errata that have been incorporated into this document. This represents all those errata corrections that have been approved by the XBRL International Versioning Working Group up to and including 25 January 2012. Hyperlinks to relevant e-mail threads may only be followed by those who have access to the relevant mailing lists. Access to internal XBRL mailing lists is restricted to members of XBRL International Inc.
No errata have been incorporated into this document.