Variables-Scope Relationships 1.0

Candidate Recommendation 30 November 2011

Copyright ©2011 XBRL International Inc., All Rights Reserved.

This version:
<http://www.xbrl.org/Specification/variables-scope/CR-2011-11-30/variables-scope-CR-2011-11-30.html>
Editors:
Herm Fischer, Mark V Systems (Formerly UBmatrix) <fischer@markv.com>
Victor Morilla, Banco de España <victor.morilla@bde.es>
Andy Harris, Oracle (Formerly UBMatrix) <andrew.c.harris@oracle.com>
Contributors:
Cliff Binstock, Coyote Reporting <cliff.binstock@coyotereporting.com>
Paul Bull, Morgan Stanley <paul.bull@morganstanley.com>
Masatomo Goto, Fujitsu <mg@jp.fujitsu.com>
Walter Hamscher, Standard Advantage / Consultant to PricewaterhouseCoopers LLP <walter@hamscher.com>
Ignacio Hernández-Ros, Reporting Estandar S.L. <ignacio@hernandez-ros.com>
Roland Hommes, Rhocon <roland@rhocon.nl>
Andy Harris, UBMatrix <andy.harris@ubmatrix.com>
Takahide Muramoto, Fujitsu <taka.muramoto@jp.fujitsu.com>
David North, CoreFiling <dtn@corefiling.com>
Hitoshi Okumura, Fujitsu <okmr@jp.fujitsu.com>
Pablo Navarro Salvador, Atos Origin sae <pablo.navarro@atosorigin.com>
David North, Corefiling <dtn@corefiling.com>
Michele Romanelli, Banca d'Italia <michele.romanelli@bancaditalia.it>
Nathan Summers, CompSci Resources <nathan.summers@compsciresources.com>
Masaru Uchida, Fujitsu <m-uchida@jp.fujitsu.com>

Status

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.

Abstract

This specification is provides the syntax and semantics for variables-scope relationships to support variable-set evaluation chaining.

Comment

1 Herm Fischer:The in-scope variable for a formula's resulting fact node originally was specified to be a fact variable binding that had the usual fact variable aspects associated with it. However in developing formulas to test this it was impossible to work out reasonable implicit filtering in the chained variable sets (because there is no filter-control of these aspects). Hence the formula result in-scope variable is respecified to only provide a PSVI validated node and to serve as a reference for the location rule.

Table of Contents

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
2 Syntax
2.1 Variables-scope relationships
2.2 Chaining by variables-scope relationships
2.3 Chaining Processing Model

Appendices

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

Table

1 Namespaces and namespace prefixes

Example

1 A = B + C with C = D + E as dependent formula

Definitions

chaining by variables scope
variables-scope relationship

Error codes

xbrlvarscopee:conflictingAspectModels
xbrlvarscopee:differentInstances


1 Introduction

The variable-scope specification define a relationship that allows explicit declaration of in-scope variables from another variable set, forming the basis for both tuple generation (see tuples specification) and a form of chained variable sets.

1.1 Background

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], and forms the basis for the tuple output production by the XBRL Formula Tuples Specification [FORMULATUPLES].

1.2 Relationship to other work

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.

1.3 Language independence

The official language of XBRL International's own work products is English and the preferred spelling convention is UK English.

1.4 Terminology

This specification is consistent with the definitions of any of the terms defined in specifications that it depends on.

1.5 Document conventions (non-normative)

Documentation conventions follow those set out in the XBRL Variables Specification [VARIABLES].

1.6 Namespaces and namespace prefixes

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.

Table 1: Namespaces and namespace prefixes
Prefix Namespace URI
varsscope http://xbrl.org/2010/variable/variables-scope
xbrlvarscopee http://xbrl.org/2010/variable/variables-scope/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

1.7 XPath usage

XPath usage is identical to that in the XBRL Variables Specification [VARIABLES].

2 Syntax

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.

2.1 Variables-scope relationships

An variables-scope relationship is a specific relationship between two variable sets and an expressed by an XLink arc.

This relationship makes the in-scope variables of the relationship's source variable set visible as in-scope variables of the relationship's target variable set.

Fact variables represent the same aspects in the target variable set as in the source aspect set, and participate in variable evaluation in the target variable set (e.g., implicit filtering).

If the source is a formula, the optional @name attribute allows associating an in-scope variable, with the name specified by this attribute, to the fact node produced by the source formula. The variable's value (if any) is the PSVI-validated result node. If the result node is a tuple, the variable may be used, with the location rule to specify production of child facts within the tuple. The variable has no aspects and does not participate in implicit filtering in chained variable sets.

[Herm Fischer: The in-scope variable for a formula's resulting fact node originally was specified to be a fact variable binding that had the usual fact variable aspects associated with it. However in developing formulas to test this it was impossible to work out reasonable implicit filtering in the chained variable sets (because there is no filter-control of these aspects). Hence the formula result in-scope variable is respecified to only provide a PSVI validated node and to serve as a reference for the location rule. ]

If the source is a variableAssertion, the optional @name attribute allows associating an in-scope variable with the name specified by this attribute, to the test expression of the source assertion. The test expression result is deemed a boolean atomic value.

This can implement a form of chaining, and also is used to provide visibility to the location aspect of a parent tuple, to implement output of child factVariables, for tuples production (see tuples specification).

Any of the variables made in-scope by this relationship may have the same variable name as a variable of the target variable-set, in which case the variable of the target variable-set is accessible, and the like-named variable of the source variable-set is not available in the target variable-set.

To declare an variables-scope relationship an XLink arc MUST:

The arcrole value, http://xbrl.org/arcrole/2010/variables-scope, is declared in the normative schema.

variables-scope relationships MUST be expressed by <varsscope:variables-scope-arc> as indicated by the restrictions imposed by the arcrole declaration in the normative schema.

If either the source or the target of a variables-scope relationship is a formula with a formula-instance relationship to an instance that is not the standard output instance, then both the source and target must be formulas with formula-instance relationship to the same output instance. Error code xbrlvarscopee:differentInstances MUST be thrown otherwise. This is to allow a processor to complete processing of one formula instance at a time.

Error code xbrlvarscopee:conflictingAspectModels MUST be thrown if the aspect model of the source variable set differs from the aspect model of the target variable set.

2.2 Chaining by variables-scope relationships

Chaining by variables scope is a form of chaining, or staging in-scope variables and result items of one value assertion, formula, or consistency assertion, to be used as input terms by a subsequent formula, by explicit specification that the dependent variable set has in-scope access to the prior variable set's variables and produced formula fact.

Example 1: A = B + C with C = D + E as dependent formula

This example shows use of variables-scope to relate two formulas, one producing a = b + c and the second producing c = d + e, to each other, with this relationship. The c = d + e formula produces its output fact item in the standard output instance, and makes it available as a named result of in-scope variables, to be used by the dependant a = b + c formula.

2.3 Chaining Processing Model

Processing order dependency is implied by variables-scope relationships where expression terms of a variable-set that is a target of a variables-scope relationship reference variables of the source variable set.

Recursion and iteration is not possible with this processing model and is detected because either would require a direct cycle in variables-scope relationships. (However limited steps of recursion could be simulated by providing different a formula resource for each such step of recursion, thus both avoiding a direct cycle and a possibility of endless looping.)

Appendix A Normative schema

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:

  1. While any schema is the most current RECOMMENDED version and until it is superseded by any additional errata corrections a non-normative version will reside on the web in the directory 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/variables-scope.xsd.
  2. A non-normative version of each schema as corrected by any update to the RECOMMENDATION will be archived in perpetuity on the web in a directory that will contain a unique identification indicating the date of the update.
  1. While any schema is the most current RECOMMENDED version and until it is superseded by any additional errata corrections a non-normative version will reside on the web in the directory 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/variables-scope.xsd.
  2. A non-normative version of each schema as corrected by any update to the RECOMMENDATION will be archived in perpetuity on the web in a directory that will contain a unique identification indicating the date of the update.
<schema
xmlns:generic
="http://xbrl.org/2008/generic"

xmlns:variable
="http://xbrl.org/2008/variable"

xmlns:varsscope
="http://xbrl.org/2010/variable/variables-scope"

xmlns
="http://www.w3.org/2001/XMLSchema"

xmlns:xbrli
="http://www.xbrl.org/2003/instance"

xmlns:link
="http://www.xbrl.org/2003/linkbase"

xmlns:xlink
="http://www.w3.org/1999/xlink"
targetNamespace="http://xbrl.org/2010/variable/variables-scope" elementFormDefault="qualified" attributeFormDefault="unqualified">
<annotation>
<appinfo>
<!-- arc from a variable-set to another variable-set to provide visibility of source's in-scope variables to target if a formula, then name on this arc gives visibility to the formula's result in the result's instance, the result behaves as if it were a factVariable in the source's in-scope variable set the to-end variable set has access to the values and aspects of the from-end variables (and formula result) but does not impact covering within the from-end variable set; to-end has implicit filtering available to match the from-side's aspects -->
<link:arcroleType id="variables-scope" cyclesAllowed="undirected" arcroleURI="http://xbrl.org/arcrole/2010/variables-scope">
<link:definition>
Provides visibility of source's variables to target and if source is a formula and name is present, provides visibility of the resulting fact produced
</link:definition>
<link:usedOn>
varsscope:variablesScopeArc
</link:usedOn>
</link:arcroleType>
</appinfo>
</annotation>
<import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
<import namespace="http://xbrl.org/2008/generic" schemaLocation="http://www.xbrl.org/2008/generic-link.xsd"/>
<import namespace="http://xbrl.org/2008/variable" schemaLocation="http://www.xbrl.org/2008/variable.xsd"/>
<element id="variables-scope-arc" name="variablesScopeArc" substitutionGroup="generic:arc">
<complexType>
<complexContent>
<extension base="generic:genericArcType">
<attribute name="name" type="variable:QName" use="optional"/>
</extension>
</complexContent>
</complexType>
</element>
</schema>

Appendix B References

FORMULATUPLES
XBRL International Inc.. "XBRL Tuples"
Herm Fischer, Victor Morilla, and Andy Harris.
(See http://www.xbrl.org/Specification/formulaTuples/PWD-2009-12-16/formulaTuples-PWD-2009-12-16.html)
VARIABLES
XBRL International Inc.. "XBRL Variables 1.0"
Phillip Engel, Herm Fischer, Victor Morilla, Jim Richards, Geoff Shuetrim, David vun Kannon, and Hugh Wallis.
(See http://www.xbrl.org/Specification/variables/REC-2009-06-22/variables-REC-2009-06-22.html)
XBRL 2.1
XBRL International Inc.. "Extensible Business Reporting Language (XBRL) 2.1"
Phillip Engel, Walter Hamscher, Geoff Shuetrim, David vun Kannon, and Hugh Wallis.
(See http://www.xbrl.org/Specification/XBRL-RECOMMENDATION-2003-12-31+Corrected-Errata-2008-07-02.htm)
XLINK
W3C (World Wide Web Consortium). "XML Linking Language (XLink) Version 1.0"
Steve DeRose, Eve Maler, and David Orchard.
(See http://www.w3.org/TR/xlink/)
XML NAMES
W3C (World Wide Web Consortium). "Namespaces in XML 1.0 (Second Edition)"
Tim Bray, Dave Hollander, Andrew Layman, and Richard Tobin.
(See http://www.w3.org/TR/REC-xml-names/)
XML SCHEMA STRUCTURES
W3C (World Wide Web Consortium). "XML Schema Part 1: Structures Second Edition"
Henry S. Thompson, David Beech, Murray Maloney, and Noah Mendelsohn.
(See http://www.w3.org/TR/xmlschema-1/)

Appendix C Intellectual property status (non-normative)

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).

Appendix D Acknowledgements (non-normative)

This document could not have been written without the contributions of many people including the participants in the Formula Working Group.

Appendix E Document history (non-normative)

DateAuthorDetails
09 May 2010Herm Fischer

First internal working draft created, by removing these variables-scope sections from the prior instances specification that had included it before, and clarifying the processing model description.

19 November 2011Herm Fischer

Section 2.1 The in-scope variable for a formula's resulting fact node, with an @name attribute, originally was specified to be a fact variable binding that had the usual fact variable aspects associated with it. However in developing formulas to test this it was impossible to work out reasonable implicit filtering in the chained variable sets (because there is no filter-control of these aspects). Hence the formula result in-scope variable is respecified to only provide a PSVI validated node and to serve as a reference for the location rule.

Added error conditions xbrlvarscopee:differentInstances and xbrlvarscopee:conflictingAspectModels.

Appendix F Errata corrections in this document

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 30 November 2011. 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.