Copyright ©2010 XBRL International Inc., All Rights Reserved.
Circulation of this Candidate Recommendation is unrestricted. This document is normative. Other documents may supersede this document. Recipients are invited to submit comments to formula-feedback@xbrl.org, and to submit notification of any relevant patent rights of which they are aware and provide supporting documentation.
1 Introduction
1.1 Background
1.2 Relationship to other work
1.3 Language independence
1.4 Terminology
1.5 Document conventions (non-normative)
1.6 Namespaces and namespace prefixes
1.7 XPath usage
1.7.1 XPath context item
2 Syntax
2.1 Instance resource element
2.2 Instance-variable relationships
2.3 Formula-instance relationships
2.4 Instance-assertion relationships
2.5 Chaining by instance relationships
2.6 Chaining Processing Model
3 Variable evaluation
4 Assertion evaluation
4.1 Consistency assertion evaluation
4.2 Existence assertion evaluation
A Normative schema
B References
C Intellectual property status (non-normative)
D Acknowledgements (non-normative)
E Document history (non-normative)
F Errata corrections in this document
1 Namespaces and namespace prefixes
1 A = B + C with C = D + E as dependent formula
2 On-demand fact production for dependent formulae
chaining by instance relationships
formula-instance relationship
instance resource
instance-assertion relationship
instance-variable relationship
The variable instances specification defines syntax for identification of instances as variable-set objects, so that multiple instances can be processed, and so that chaining by instance relationships can be supported.
It provides relationships that allow variables to be bound explicitly to specified instances, and that allow formula results to be directed explicitly to a specified instance.
Each instance is independent of the other; it may have a different DTS, or be an instance with some commonality of parts to other DTSes, but deemed independent of other instance DTSes.
This specification is a member of a suite of similar specifications that define specific types of criteria that can be used to select facts from one or more input XBRL instance. It enhances the fact selection capabilities of the XBRL Variables Specification [VARIABLES], the output production of the XBRL Formulas Specification, [FORMULA].
This specification depends upon the XBRL Specification [XBRL 2.1], and the XBRL Variables Specification [VARIABLES]. In the event of any conflicts between this specification and the specifications upon which it depends, this specification does not prevail.
The official language of XBRL International's own work products is English and the preferred spelling convention is UK English.
This specification is consistent with the definitions of any of the terms defined in specifications that it depends on.
Documentation conventions follow those set out in the XBRL Variables Specification [VARIABLES].
Namespace prefixes [XML NAMES] will be used
for elements and attributes in
the form ns:name
where ns
is the
namespace prefix and name
is the local name.
Throughout this specification, the mappings
from namespace prefixes to actual namespaces is consistent
with
Table
1.
The prefix column in Table 1 is non normative. The namespace URI column is normative.
Prefix | Namespace URI |
---|---|
instances
|
http://xbrl.org/2010/variable/instance
|
xbrlvarinste
|
http://xbrl.org/2010/filter/variable/instance/error
|
eg
|
http://example.com/
|
fn
|
http://www.w3.org/2005/xpath-functions
|
link
|
http://www.xbrl.org/2003/linkbase
|
xbrli
|
http://www.xbrl.org/2003/instance
|
xfi
|
http://www.xbrl.org/2008/function/instance
|
xbrldi
|
http://xbrl.org/2006/xbrldi
|
xbrldt
|
http://xbrl.org/2005/xbrldt
|
xl
|
http://www.xbrl.org/2003/XLink
|
xlink
|
http://www.w3.org/1999/xlink
|
xs
|
http://www.w3.org/2001/XMLSchema
|
xsi
|
http://www.w3.org/2001/XMLSchema-instance
|
gen
|
http://xbrl.org/2008/generic
|
variable
|
http://xbrl.org/2008/variable
|
iso4217
|
http://www.xbrl.org/2003/iso4217
|
XPath usage is identical to that in the XBRL Variables Specification [VARIABLES].
The XPath expressions specified or implied by a
factVariable and
its filters,
or by a generalVariable,
where the variable has at least one
instance-variable relationship
are evaluated using the sequence of
<xbrli:xbrl>
elements of the related
instances. Each
<xbrli:xbrl>
element, and its descendant nodes, are isolated to
the associate each such variable only to taxonomy information of its own DTS.
The XPath expressions specified or implied by an
assertion that has at least one
instance-assertion relationship
are evaluated using the sequence of
<xbrli:xbrl>
elements of the related
instances. Each
<xbrli:xbrl>
element, and its descendant nodes, are isolated to
the associate each such variable only to taxonomy information of its own DTS.
This paragraph also applies to any
validation messages
that are related to the assertion, that have XPath expressions.
The XPath expressions specified or implied by all other constructs are evaluated
using the
<xbrli:xbrl>
element of the standard normal source input instance to a
formula processor. (For example, XPath expressions of
parameters,
preconditions and
formula elements are only
evaluated by the standard source input instance and its DTS, irrespective of the
instance-variable relationships of any variables in the related variable set.
This specification only provides a textual declaration of syntax constraints when those constraints are not expressed by the normative schema supplied with this specification.
Explanations of elements and attributes are only supplied when explanations are not already provided in other specifications.
Unless explicitly stated otherwise, a reference to a specific element MUST be read as a reference to that element or to any element in its substitution group.
An instance resource is declared by a
<instanaces:instance>
element.
The syntax for the
<instances:instance>
element
is defined by the normative schema supplied with this specification.
The instance resource of an input instance document represents the loaded
instance with its accompanying DTS, with a context element of its <xbrli:xbrl>
element. It is of type variable:parameter, so that the semantics of parameter also apply to
the instance resource. (The parameter type is always element(xbrli:xbrl), its nodes are
treated as validated PSVI typed nodes.)
Instances can be loaded and saved by a formula processor in a similar manner as a formula processor does for its usual source input instance (and formula output instances), this is left unspecified to be an implementation issue.
Fact variables that are bound to item(s) of an instance are isolated to that instance and the DTS of that instance. If bound as a sequence there may be items from multiple instances together in the same sequence, each item associated individually with its instance and the DTS of its instance.
General variables that are bound to elements (or attributes) of an instance are isolated to that instance and the DTS of that instance. If bound as a sequence there may be nodes from multiple instances, each item associated individually with its instance and the DTS of its instance.
xbrli:xbrl
element
if the respective DTS, such as may be supplied by using the instance resource's name as a variable
QName, or any relevant expression such as $var/ancestor::xbrli:xbrl
or
root(.)/xbrli:xbrl
.
Output instances that are produced by the formula element, source, and aspect rules, have the DTS of output instance determined by source elements (and their original input instance associated DTS). Intermixing output facts with source or aspect rules of incompatible input instance DTSes will lead to invalid output instances, and should be avoided by formula authors (but is not intended to be detected automatically).
An output instance produced by a formula element with no sources (e.g., all aspects created by explicit aspect rules) must have the output DTS corresponding to the implied (ordinary) input DTS as it would be in the absence of any use of features of this specification.
An instance with the QName
<instances:standard-input-instance>
refers to the standard normal source input instance to a formula processor, and with the QName
<instances:standard-output-instance>
refers to the standard normal output instance for production of formula result items and result tuples.
An instance-variable relationship is a specific relationship
between an
<instances:instance>
and a factVariable
or a generalVariable expressed by an
XLink arc.
To declare an instance-variable relationship an XLink arc MUST:
http://xbrl.org/arcrole/2010/instance-variable
The arcrole value,
http://xbrl.org/arcrole/2010/instance-variable
,
is declared in the normative schema.
Instance-variable relationships MUST be expressed by generic arcs as indicated by the restrictions imposed by the arcrole declaration in the normative schema.
An formula-instance relationship is a specific relationship
between a formula
and an
<instances:instance>
expressed by an
XLink arc.
To declare an formula-instance relationship an XLink arc MUST:
http://xbrl.org/arcrole/2010/formula-instance
The arcrole value,
http://xbrl.org/arcrole/2010/formula-instance
,
is declared in the normative schema.
Formula-instance relationships MUST be expressed by generic arcs as indicated by the restrictions imposed by the arcrole declaration in the normative schema.
An instance-assertion relationship is a specific relationship
between an
<instances:instance>
and a assertion
expressed by an
XLink arc.
To declare an instance-variable relationship an XLink arc MUST:
http://xbrl.org/arcrole/2010/instance-assertion
The arcrole value,
http://xbrl.org/arcrole/2010/instance-assertion
,
is declared in the normative schema.
Instance-variable relationships MUST be expressed by generic arcs as indicated by the restrictions imposed by the arcrole declaration in the normative schema.
Chaining by instance relationships is a form of chaining, or staging result items of one formula, to be used as input terms by a subsequent formula, by explicit specification that the dependent terms are obtained as results from other formulas.
This form of chaining can only relate the fact item produced by one formula to an input term of a subsequent variable set. See Chaining by variables scope for chaining by use of variable set in-scope variables visibility, which can also be used for tuples production. This form of chaining provides maximal isolation of the result-producing formula from the chained dependent value consuming formula.This example shows use of instance-variable and formula-instance relationships to relate two formulas, one producing a = b + c and the second producing c = d + e, to each other. The c = d + e formula produces its output fact item in an intermediate scratch-pad instance to be used by the dependant a = b + c formula. |
Processing order dependency is implied by instance-variable relationships that depend on facts produced by formulas with formula-instance relationships to the same instance for the same fact as is produced.
All formulas with formula-instance relationships to a given instance may be processed before any variable sets with variables having instance-variable relationships to the same instance are processed. (This is permissive, not mandatory.)
This specification anticipates that fact items of a consuming instance-variable relationship are not produced on demand by the producing formula-instance relationship, but instead that all of the formulas with formula-instance relationships may be completed before any varible-set bindings of instance-variable relationships attempt to consume such facts. This permits optimization of formula processor implementations. This specification does not make it an error for a formula processor to produce facts on demand before consumption.
Recursion and iteration is not provided by this processing model. It could be simulated by having each step of processing assigned to a separate intermediate instance, thus preventing the possibility of endless looping.
Example 1 of A = B + C chained from C = D + E produced a fact item of C in a separate instance document, a temporary instance result, from the fact item of A, in the standard output instance document. It is not required that the processor implementation support intermixing A and C in the same instance document, as that would create an on-demand dependency between producing formula and consuming variable set.
Error code xbrlvarinste:instanceVariableRecursionCycle MUST be thrown if there is a cycle where an variable set with a formula-instance relationship and a chained consuming variable set could or does evaluate recursively.
The specification in [VARIABLES] for variable evaluation is an evaluation against a single input XBRL instance. This specification allows that a variable MAY have instance-variable relationships. If there are multiple such relationships to a single variable, the evaluation is deemed by this specification to be an evaluation against the set of input XBRL instances represented by such relationships.
The specification in [VARIABLES] for source sequence of evaluation is deemed by this specification to be a single conjoined set of the sequences obtained by evaluating the XPath expression implied by a general variable or a fact variable against the set of input XBRL instances represented by instance-variable relationships.
The specifications in [VARIABLES] for binding as a sequence and binding to an empty sequence apply to the single conjoined source sequence of evaluation of all related input XBRL instances.
XPath expressions in assertion elements, and related validation messages, have the XPath context
Section
1.7
of the sequence of
<xbrli:xbrl>
elements of input XBRL instances represented by
instance-assertion relationships.
This facilitates the XPath expressions of assertion elements, and their validation messages,
to include terms and computations
based on the set of
<xbrli:xbrl>
elements and their
descendants.
An assertion input is described in [VALIDATION] as a single input XBRL instance. An assertion MAY have instance-assertion relationships. If there are multiple such relationships to a single assertion, that assertion's assertion input is deemed by this specification to be the set of input XBRL instances represented by the relationships.
Consistency assertion evaluation is specified in [CONSISTENCY ASSERTIONS] as evaluation against aspect-matched input facts of a single input XBRL instance. An assertion MAY have instance-assertion relationships. If there are multiple such relationships to a single consistency assertion, the consistency assesrtion evaluation is deemed by this specification to be an evaluation against the set of input XBRL instances represented is a single conjoined set of the aspect-matched input facts obtained from each input XBRL instances represented by instance-assertion relationships.
Existence assertion evaluation is specified in [EXISTENCE ASSERTIONS] under processing model for existence assertions as most one evaluation for a given assertion input. If an existence assertion has multiple instance-assertion relationships, the processing model must have at most one evaluation for an assertion input of conjoined input XBRL instances represented by the instance-assertion relationships.
The following is the XML schema provided as part of this specification. This is normative. Non-normative versions (which should be identical to these except for appropriate comments indicating their non-normative status) are also provided as separate files for convenience of users of the specification.
NOTE: (non-normative) Following the schema maintenance policy of XBRL International, it is the intent (but is not guaranteed) that the location of non-normative versions of these schemas on the web will be as follows:
http://www.xbrl.org/2008/
- during the drafting process for
this specification this directory should contain a copy of the
most recent published version of the schema at
http://www.xbrl.org/2010/variable/instance.xsd.
http://www.xbrl.org/2008/
. During the drafting process for
this specification this directory should contain a copy of the
most recent published version of the schema at
http://www.xbrl.org/2010/variable-instance.xsd.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to XBRL International or XBRL organizations, except as required to translate it into languages other than English. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (www.xbrl.org/legal).
This document and the information contained herein is provided on an "AS IS" basis and XBRL INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The attention of users of this document is directed to the possibility that compliance with or adoption of XBRL International specifications may require use of an invention covered by patent rights. XBRL International shall not be responsible for identifying patents for which a license may be required by any XBRL International specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. XBRL International specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents. XBRL International takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (www.xbrl.org/legal).
This document could not have been written without the contributions of many people including the participants in the Formula Working Group.
Date | Author | Details |
---|---|---|
13 December 2009 | Herm Fischer |
First internal working draft created, drawing extensively on wiki page discussions in 2008 and early 2009, discussions with Fujitsu team at Bank of Japan hosted meeting in early 2009, and initial UBmatrix implementation. |
09 May 2010 | Herm Fischer |
Revised per working group discussions to separate variable-scope relationships to a separate spec (variable-scope.xml), and to clarify processing model for dependencies between produced and consumed instances fact items. |
12 June 2010 | Herm Fischer |
Per working group discussion 2010-06-03 added error ( xbrlvarinste:instanceVariableRecursionCycle ) . |
18 June 2010 | Herm Fischer |
Added Section 1.7.1. Added instance-assertion arcs in Section 2.4. |
20 June 2010 | Herm Fischer |
Added Section 3 and Section 4. Added validation message XPath expressions to XPath usage specified for assertions. |
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 Formula Working Group up to and including 23 June 2010. 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.