### XBRL Variable Dependency Example Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Illustrates a circular dependency scenario involving fact and general variables, where variable evaluation forms a cycle. ```text Fact variable `$a` implies an XPath expression that includes an XPath variable reference to general variable `$b`. General variable `$b` implies an XPath expression that includes an XPath variable reference to general variable `$c`. General variable `$c` implies an XPath expression that includes an XPath variable reference to fact variable `$a`. Note that a circular set of XPath variable references can involve both fact and general variables. ``` -------------------------------- ### XPath Variable References in Filters Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Clarifies that the resolution of XPath variable references within filters follows the same rules as described in the specification. A non-normative example is provided. ```xpath $variableName ``` -------------------------------- ### Declare Variable-Set-Filter Relationship with XLink Arc Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the requirements for an XLink arc to declare a variable-set-filter relationship. It requires a specific arcrole, a variable set resource as the start, and a filter as the end. ```xml ``` -------------------------------- ### Declare Variable-Set Relationship with XLink Arc Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the requirements for an XLink arc to declare a variable-set relationship. It must have a specific arcrole, a variable-set resource as the start, and a variable or parameter as the end. ```xml ``` -------------------------------- ### Clarifying XPath Variable Reference Resolution in Filters Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This erratum clarifies the handling of XPath variable references within filters. A non-normative example is added to indicate that filters can utilize the same variable resolution mechanisms described in the specification. -------------------------------- ### Namespaces and Prefixes Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Demonstrates the common format for elements and attributes using namespace prefixes, such as 'ns:name'. ```XML ns:name ``` -------------------------------- ### Element and Attribute Notation in XBRL Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Demonstrates how elements and attributes are referenced using namespace prefixes and local names. Attributes are prefixed with '@', and '*' can denote any attribute within a namespace. ```XML ``` ```XML @id ``` ```XML @xml:* ``` -------------------------------- ### Clarify Aspect Models and Simplify @bindEmpty Attribute (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Changes 'any' to 'all' for clarity in aspect model requirements. Adds a summary table for aspects, eliminates the redundant `@bindEmpty` attribute, and simplifies explanations for fact variable evaluation with empty sequences. Also fixes grammatical errors. ```text Changed any to all to improve the clarity of the requirement that aspect models include aspects for whatever content is permitted in segments and scenarios. Added a table summarising the aspects in the dimensional and non-dimensional aspect models. Eliminated the redundant `@bindEmpty` attribute and simplified the specification explanation for how fact variables evaluate when their source sequences are empty. Fixed grammatical errors in the definition of a precondition. These changes were suggested by **Paul Bull**. ``` -------------------------------- ### Simplify Aspect Model Definitions and Remove @bindEmpty (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 The specification now uses 'all' instead of 'any' for aspect models to clarify requirements for content in segments and scenarios. The redundant '@bindEmpty' attribute has been eliminated, simplifying how fact variables evaluate with empty source sequences. ```xml ``` -------------------------------- ### XBRL Precondition Element Syntax Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Describes the '' element used to define preconditions for XBRL variable set evaluations. The '@test' attribute contains an XPath expression evaluated against the XBRL instance context node. ```xml ``` -------------------------------- ### XBRL SimpleType Definitions (XML) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This section defines two simple types: 'expression' for string values with specific pattern constraints, and 'QName' for qualified names. ```xml ``` -------------------------------- ### Variable QName Resolution Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This snippet demonstrates the revised syntax for variable and parameter names, using a single attribute that specifies a QName. It clarifies how names without a QName prefix are resolved to a QName with no namespace. ```XML ``` -------------------------------- ### Namespace Prefix to URI Mappings Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Provides a table mapping common namespace prefixes to their corresponding URIs, used for qualifying elements and attributes in XBRL documents. ```XML Prefix | Namespace URI variable | http://xbrl.org/2008/variable xbrlve | http://xbrl.org/2008/variable/error aspectTest | http://xbrl.org/2008/variable/aspectTest 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://www.xbrl.org/2006/xbrldi xbrldt | http://www.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 iso4217 | http://www.xbrl.org/2003/iso4217 ``` -------------------------------- ### XBRL Parameter Element Definition Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the 'parameter' element, a substitution for resources. It supports attributes like 'name', 'select', 'required', and 'as', allowing for flexible parameterization in XBRL processes. ```xml ``` -------------------------------- ### XBRL Variable Naming with QNames Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This snippet demonstrates the evolution of specifying variable and parameter names in XBRL. Initially, a single attribute was used, but to prevent namespace-related issues with XPath 2.0, it was revised to use separate `@name` and `@namespace` attributes. Later, it reverted to a single attribute for QNames, with restrictions on the XML Schema Name type and explicit rules for resolving names without prefixes. ```XML ``` ```XML ``` ```XML ``` ```XML ``` -------------------------------- ### Align XBRL Function Names with Naming Conventions (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 The naming of XBRL functions used for dimension aspect tests has been brought into alignment with the function naming conventions established in the function registry. ```xquery xbrldt:testDimensionAspect($node, $dimension) ``` -------------------------------- ### Update Schema Imports for XBRL 2.1 (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Schema imports in the normative schema were updated to include the generic link schema and XBRL 2.1 schemas. This addresses software expecting specific imports for arcrole type declarations and XBRL 2.1 schema references. ```xml ``` -------------------------------- ### XBRL ArcroleType Definitions (XML) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This section defines various 'arcroleType' elements used in XBRL, specifying their URIs, definitions, and usage within the schema. These include definitions for equality, variable sets, filters, and preconditions. ```xml typed-dimension domain definition has equality definition gen:arc variable set has variable variable:variableArc variable has filter variable:variableFilterArc fact variables in variable set have filter variable:variableSetFilterArc variable set has precondition gen:arc ``` -------------------------------- ### Define Variable Set Resource Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Shows the structure of a variable-set resource, which defines a variable set and specifies its aspect model using the '@aspectModel' attribute. ```xml ``` -------------------------------- ### XBRL Precondition Element Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the 'precondition' element, a resource substitution used for specifying conditions in XBRL. It requires a 'test' attribute of type 'variable:expression'. ```xml ``` -------------------------------- ### XBRL Concept Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the concepts of two XBRL facts. The aspect test ensures that the namespace URIs and local names of the concepts are identical. ```XPath (namespace-uri($aspectTest:a) eq namespace-uri($aspectTest:b)) and (local-name($aspectTest:a) eq local-name($aspectTest:b)) ``` -------------------------------- ### XBRL Variable Schema Definition (XML) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This snippet defines the root element of the XBRL variable schema, including namespaces for XLink, XML Schema, and custom XBRL namespaces. It also imports other necessary XBRL schemas. ```xml ``` -------------------------------- ### Move @bindEmpty and @bindAsSequence to Variable Resources Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 The `@bindEmpty` and `@bindAsSequence` attributes were moved from the formula arc to general and fact variable resources. This allows these classifications to be used outside of formulas, such as in XBRL instance validation. ```xml ``` -------------------------------- ### XBRL Parameter Declaration Syntax Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Declares a parameter with an optional QName name, a required attribute, and an optional XPath select expression for default values. Parameters can also have an 'as' attribute to specify the required data type, ensuring type consistency. ```xml ``` -------------------------------- ### Variable and Parameter Naming Attributes Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This snippet illustrates how variable and parameter names are specified using separate attributes for the local name and namespace to prevent unintended changes. It addresses the handling of XPath 2.0 variables with no namespace. ```XML ``` -------------------------------- ### XBRL Variable-Set-Precondition Relationship using XLink Arc Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Shows how to define a relationship between an XBRL variable set and a precondition using an XLink arc. The arc must have a specific arcrole value and link the variable set to the precondition. ```xml ``` -------------------------------- ### XBRL Element Notation Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Represents a specific XBRL element using its namespace prefix and local name. ```XML ``` -------------------------------- ### XPath Explicit Dimension Tests Comparison Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Updates XPath code for explicit dimension tests. It replaces the use of the xfi:nodes-correspond function for comparing QName typed results with the XPath 2.0 'eq' operator. ```xpath xfi:fact-explicit-dimension-value() eq "some-QName" ``` -------------------------------- ### Standardize Hyperlink Format and Correct Error (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Hyperlink formats to the normative schema have been standardized. An erroneous statement regarding filter relationships was corrected, clarifying that variable-set filter relationships are expressed by variable-set filter arcs. ```xml ``` -------------------------------- ### XBRL Parameter Clarifications and Overrides Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Provides clarifications on XBRL parameters, including their use as global variables, evaluation context, error handling for circular references, and how variable set relationships can override parameter access. ```xpath (parameter name used as global variable) (XPath expressions use /xbrli:xbrl as context) (Circular references raise error) (Variable set relationships override global variable access) ``` -------------------------------- ### XBRL Precondition Element and @test Attribute Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Illustrates the declaration of a precondition using the element. The @test attribute within this element holds an XPath expression used to evaluate the condition for variable set evaluation. ```xml ``` -------------------------------- ### XBRL General Variable Declaration Syntax Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Declares a general variable using a `` element. The variable's value is determined by an XPath expression specified in the '@select' attribute. The context for evaluating this expression is the `` element of the input XBRL instance. ```xml ``` -------------------------------- ### XBRL Parameter Declaration Syntax Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Specifies the XML element for declaring parameters within XBRL, including attributes for the parameter's QName, whether it's required, and an optional XPath expression for default value calculation. ```XML ``` -------------------------------- ### Modify XBRL Functions for Dimension Value Testing (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 XBRL functions used for testing segment and scenario dimension matches have been modified to eliminate the need for direct node retrieval for s-equal2 conditions, accommodating dimensions with default values. ```xquery xbrldt:s-equal2(xbrldt:get-dimension-value($node, $dimension)) ``` -------------------------------- ### Define Default Function Namespace (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 A default function namespace has been defined to standardize the usage of XBRL functions within the specification. ```xml ``` -------------------------------- ### Relax QName Requirement for Custom Function Signatures (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 The requirement for data types in custom function signatures to be expressed as QNames has been relaxed to accommodate the handling of sequences, providing greater flexibility. ```xml ``` -------------------------------- ### Reintroduce @bindAsSequence Attribute for General Variables (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 The '@bindAsSequence' attribute has been reintroduced for general variables following user feedback. This attribute influences how variables bind to sequences, impacting output facts and simplifying use cases. ```xml ``` -------------------------------- ### XBRL Attribute Notation Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Represents an XBRL attribute using its local name, distinguished by an '@' symbol. It also shows notation for any attribute within a specific namespace. ```XML @id ``` ```XML @xml:* ``` -------------------------------- ### XBRL Variable Schema Root Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This is the root element of the XBRL variable schema, defining namespaces and importing other relevant schemas. It establishes the core structure for XBRL variable definitions. ```XML typed-dimension domain definition has equality definition gen:arc variable set has variable variable:variableArc variable has filter variable:variableFilterArc fact variables in variable set have filter variable:variableSetFilterArc variable set has precondition gen:arc ``` -------------------------------- ### XBRL Equality Definition Element Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the 'equalityDefinition' element, used for specifying equality tests within XBRL. It inherits from 'variable:resource.type' and requires a 'test' attribute of type 'variable:expression'. ```xml ``` -------------------------------- ### XBRL Resource Type Definition (XML) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Defines a complex type 'resource.type' that extends the 'xl:resourceType' and allows XML namespace attributes. ```xml ``` -------------------------------- ### Update Schema Imports for Generic and XBRL 2.1 Schemas (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Fixes schema imports in the normative schema to include an import of the generic link schema and the XBRL 2.1 schemas. This supports software expecting these imports for arcrole type declarations. ```text Fixed up schema imports in the normative schema to include an import of the generic link schema to support some software that expects such imports when arcrole type declarations refer to elements in those schemas and to include an import of the XBRL 2.1 schemas on the public XII website. ``` -------------------------------- ### XBRL Complete Scenario Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the complete content of the scenario aspect for two XBRL facts, without interpreting it via XBRL Dimensions. Uses 'xfi:nodes-correspond'. ```XPath xfi:nodes-correspond(xfi:scenario($aspectTest:a), xfi:scenario($aspectTest:b)) ``` -------------------------------- ### XBRL Naming Attribute Group (XML) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Defines an attribute group named 'naming.attribute.group' which includes a required 'name' attribute of type 'variable:QName'. ```xml ``` -------------------------------- ### Add Missing Reference for XQuery and Correct Reference (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Adds a missing reference for XQuery and corrects a reference to 'Pablo' in the revision history. ```text Added a missing reference for XQuery. Corrected reference to Pablo in the revision history. ``` -------------------------------- ### Correcting XPath Function Parameters in XBRL Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This erratum addresses missing required parameters for XPath code referencing xfi:facts-in-instance() and xfi:non-nil-facts-in-instance() functions. It ensures the correct evaluation context for these functions within XBRL specifications. ```XPath xfi:facts-in-instance(/xbrli:xbrl) xfi:non-nil-facts-in-instance(/xbrli:xbrl) ``` -------------------------------- ### XBRL Equality-Definition Relationship Arcrole Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Defines the specific arcrole value required for establishing an equality-definition relationship in XBRL. This arcrole links a typed-dimension domain definition to an equality definition via an XLink arc. ```xml ``` -------------------------------- ### XBRL Variable Evaluation Error Codes Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This snippet outlines specific error codes that may be generated during XBRL variable evaluation, such as ambiguous aspects, ambiguous aspect values, unresolved dependencies, and cyclic dependencies. ```text Error code xbrlve:ambiguousAspects Error code xbrlve:ambiguousAspectValues Error code xbrlve:unresolvedDependency Error code xbrlve:cyclicDependencies ``` -------------------------------- ### XBRL Custom Function Signature Syntax Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the XML structure for declaring custom XPath functions not found in standard specifications or the XBRL Functions registry. Includes attributes for function name, output type, and input parameter types. ```XML ``` -------------------------------- ### XBRL Variable-Set-Precondition Relationship Arcrole Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Specifies the XLink arcrole used to declare a relationship between an XBRL variable set resource and a precondition. This arcrole value must be 'http://xbrl.org/arcrole/2008/variable-set-precondition'. ```xml ``` -------------------------------- ### XPath Filter Complement Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Demonstrates how the filter complement is represented in XPath using the fn:not() function to select facts not matched by a specific filter. ```xpath fn:not(implied-xpath-expression-of-filter) ``` -------------------------------- ### XBRL General Variable Element Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the 'generalVariable' element, a type of variable substitution. It includes 'select' and 'bindAsSequence' attributes, crucial for defining general variables with specific selection criteria and binding behavior. ```xml ``` -------------------------------- ### Using XPath 'eq' Operator for Dimension Tests Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This correction updates XPath code for explicit dimension tests. It replaces the use of the xfi:nodes-correspond function with the XPath 2.0 'eq' operator for comparing QName typed results, ensuring accurate dimension value comparison. ```XPath (Ai eq Bi) ``` -------------------------------- ### Reinstate @bindAsSequence Attribute for General Variables (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Reintroduces the `@bindAsSequence` attribute for general variables due to demand and sensible use cases. This attribute influences how variables bind when evaluated, impacting output facts when dealing with source sequences. ```text The `@bindAsSequence` attribute for general variables is back by popular demand after being eliminated during the reworking of the second public working draft to produce the third public working draft. It was eliminated because of the potential for the one formula, with the one set of evaluations for fact variables, to produce quite different output facts if general variables do not get forced to always bind to sequences. A number of sensible use cases that could be simplified by general variables that do bind to individual items in the source sequence rather than the source sequence itself have motivated the return of the attribute for general variables. Added paragraphs to the sections on general variables and fact variables pointing to the explanations of the attributes impacting on how they bind when they are evaluated depending on the `@bindAsSequence` and `@bindEmpty` attributes. These are intended only to ease navigation of the specification. ``` -------------------------------- ### XBRL Function Element Definition Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines the 'function' element, which is a type of resource substitution. It includes attributes for 'name' and 'output', and can contain 'input' elements with a 'type' attribute. This structure is used for defining functions within XBRL. ```xml ``` -------------------------------- ### XBRL Location Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the location of two XBRL facts. The aspect test checks if the parent elements of the facts are the same. ```XPath $aspectTest:a/.. is $aspectTest:b/.. ``` -------------------------------- ### Define Variable Set Resource Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines a variable set using a local XLink resource. The '@aspectModel' attribute specifies the aspect model identifier for evaluating variables within this set. ```XML ``` -------------------------------- ### Variable QName Data Type Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This snippet clarifies the use of the `variable:QName` data type for attributes containing XPath variable names, as suggested for better understanding of the specification's intent. ```XML ``` -------------------------------- ### Remove Obsolete order Attribute from variable:input (XBRL Specification) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 The obsolete 'order' attribute has been removed from the '' element in custom function declarations. Input parameter ordering is now determined by the document order of the '' elements. ```xml ``` -------------------------------- ### Relax QName Requirement for Custom Function Signatures (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Relaxes the requirement for data types in custom function signatures to be expressed as QNames, accommodating the need to work with sequences. ```text Relaxed the requirement that data types for custom function signatures be expressed as QNames given the need to deal in sequences. ``` -------------------------------- ### XBRL Complete Segment Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the complete content of the segment aspect for two XBRL facts, without interpreting it via XBRL Dimensions. Uses 'xfi:nodes-correspond'. ```XPath xfi:nodes-correspond(xfi:segment($aspectTest:a), xfi:segment($aspectTest:b)) ``` -------------------------------- ### Complemented Variable-Filter Arc Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Illustrates a complemented variable-filter relationship, where the arc has a '@complement' attribute set to 'true', indicating the use of the filter complement. ```xml ``` -------------------------------- ### XBRL Namespace Handling for Variables Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This snippet illustrates a change made to ensure that variables like `$a` and `$b` used in aspect test definitions are placed in a namespace defined within the specification itself. This minimizes the risk of unintended variable name collisions. ```XPath let $a := ... in ... let $b := ... in ... ``` -------------------------------- ### XBRL Unit Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the units of two numeric XBRL facts. The aspect test utilizes the 'xfi:nodes-correspond' function to check for unit equivalency. ```XPath xfi:nodes-correspond(xfi:unit($aspectTest:a), xfi:unit($aspectTest:b)) ``` -------------------------------- ### Custom Typed Dimension Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This XPath expression allows for custom comparison logic for typed dimension values. It includes a placeholder for a custom XPath expression, which is defined in the '@test' attribute of an equality definition. ```xpath (fn:count(xfi:fact-typed-dimension-value($aspectTest:a,#dimension)/*) eq 1) and (fn:count(xfi:fact-typed-dimension-value($aspectTest:b,#dimension)/*) eq 1) and (#custom) ``` -------------------------------- ### XPath for All XBRL Facts Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 This XPath expression is used as the base for filtering all facts (including nil) in an XBRL instance when the @nils attribute is true. ```xpath xfi:facts-in-instance(/xbrli:xbrl) ``` -------------------------------- ### XBRL Variable Arc Declaration Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Illustrates the declaration of a variable arc, which is used to express relationships between a variable-set resource and a variable or parameter. The syntax is defined by the normative schema. ```xml ``` -------------------------------- ### XBRL Period Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the periods of two XBRL facts. The aspect test relies on the 'xfi:nodes-correspond' function to check if the periods correspond. ```XPath xfi:nodes-correspond(xfi:period($aspectTest:a), xfi:period($aspectTest:b)) ``` -------------------------------- ### XBRL Typed-Dimension Aspect Equality Test Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Refines the definition for default typed-dimension aspect equality testing. It specifies criteria for sequences of atomic values obtained by atomizing nodes, ensuring they have the same length and that corresponding items evaluate to true using the XPath 2.0 'eq' expression. ```xpath count(As) = count(Bs) for $i in (1 to count(As)) return (As[$i] eq Bs[$i]) ``` -------------------------------- ### XBRL Non-XDT Scenario Aspect Test Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Tests for the equivalency of the non-XDT scenario aspect, excluding XDT content. It compares the remainder of the scenario nodes. ```XPath for $remainder-a in xfi:fact-scenario-remainder($aspectTest:a), $remainder-b in xfi:fact-scenario-remainder($aspectTest:b) return ((count($remainder-a) eq count($remainder-b)) and (every $i in 1 to count($remainder-a) satisfies xfi:nodes-correspond($remainder-a[$i],$remainder-b[i]) )) ``` -------------------------------- ### XBRL Function Name Changes (XSLT) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Conforms function names to the function registry. These changes ensure consistency with the official XBRL function naming conventions. ```xml ``` -------------------------------- ### Covering Variable-Filter Arc Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Demonstrates a covering variable-filter relationship, where the arc has a '@cover' attribute set to 'true', signifying that the filter covers aspects of the facts. ```xml ``` -------------------------------- ### XPath Notation in XBRL Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Specifies that XPath expressions within the XBRL specification refer to XPath 2.0 and outlines the concept of containing and enclosing elements for evaluating these expressions. ```XPath XPath 2.0 ``` -------------------------------- ### XBRL Custom Function Signature Syntax Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Declares a custom function not present in standard XPath or XBRL registries. It uses a `` element with attributes for name and output data type, and `` elements for parameter data types. Custom functions can be used in XPath expressions. ```xml ... ``` -------------------------------- ### XBRL Entity Identifier Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the entity identifiers of two XBRL facts. The aspect test uses 'xfi:fact-identifier-scheme' and 'xfi:fact-identifier-value' to check for equivalency. ```XPath (xfi:fact-identifier-scheme($aspectTest:a) eq xfi:fact-identifier-scheme($aspectTest:b)) and (xfi:fact-identifier-value($aspectTest:a) eq xfi:fact-identifier-value($aspectTest:b)) ``` -------------------------------- ### XPath Variable References in Filter Expressions Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Illustrates how filters can utilize XPath variable references, typically referencing variables and parameters defined within a variable set. This allows for dynamic filtering based on external or contextual data. The specification notes that the resolution of these references is dependent on other specifications. ```xml ``` -------------------------------- ### Default Typed Dimension Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This XPath expression defines the default comparison for typed dimension values. It checks if both values represent a single fact and if their root elements correspond based on element and attribute matching. ```xpath (fn:count(xfi:fact-typed-dimension-value($aspectTest:a,#dimension)/*) eq 1) and (fn:count(xfi:fact-typed-dimension-value($aspectTest:b,#dimension)/*) eq 1) and (xfi:nodes-correspond(xfi:fact-typed-dimension-value($aspectTest:a,#dimension)/*[1],xfi:fact-typed-dimension-value($aspectTest:b,#dimension)/*[1])) ``` -------------------------------- ### XBRL Variable-Set Filter Arc Declaration Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Illustrates the declaration of a variable-set filter arc, used to express relationships between a variable set resource and a filter. The specific syntax is provided by the normative schema. ```xml ``` -------------------------------- ### Define Default Function Namespace (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Defines a default function namespace within the XBRL specification. ```text Defined a default function namespace. ``` -------------------------------- ### XBRL Non-XDT Scenario Aspect Test (XPath) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Compares the scenario content excluding XBRL Dimensions aspects. It checks for equal counts and correspondence of remainder nodes using 'xfi:fact-scenario-remainder' and 'xfi:nodes-correspond'. ```XPath for $remainder-a in xfi:fact-scenario-remainder($aspectTest:a), $remainder-b in xfi:fact-scenario-remainder($aspectTest:b) return ((count($remainder-a) eq count($remainder-b)) and (every $i in 1 to count($remainder-a) satisfies xfi:nodes-correspond($remainder-a[$i],$remainder-b[i]) )) ``` -------------------------------- ### XBRL Variable-Set Relationship Arcrole Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Defines the arcrole for establishing relationships between variable sets and variables or parameters. This arcrole is declared in the normative schema for variables and is essential for validation against the XBRL Specification. ```xml ``` -------------------------------- ### Standardize Hyperlink Format and Correct Statement (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Standardizes the format of hyperlinks to the normative schema and corrects an erroneous statement regarding variable-set filter relationships, specifying they are expressed by variable-set filter arcs. ```text Standardised the format of the hyperlinks to the normative schema. Corrected an erroneous statement that variable-set filter relationships have to be expressed by filter arcs instead of variable-set filter arcs. ``` -------------------------------- ### XBRL Aspect Model Identifiers Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 Specifies the unique identifiers for the two primary aspect models defined in the XBRL specification: non-dimensional and dimensional. These identifiers are used to distinguish between different ways of organizing fact information. ```text non-dimensional dimensional ``` -------------------------------- ### Introduce New Regex Constraint for variable:expression (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Inserts a new regular expression constraint on the `variable:expression` data type, based on suggestions to achieve specific objectives without unintended consequences. Also corrects a reference and a grammatical error. ```text Inserted a new regular expression constraint on the `variable:expression` data type in the normative schema based on the suggestion from **Cliff Binstock**. This achieves the objectives of the constraint in the third Public Working Draft without the unintended consequences. From feedback by **Pablo Navarro Salvador**: fixed up the erroneous reference to a ` ` instead of a ` `; and fixed up the grammatical error "the how the" in the section on aspect models. ``` -------------------------------- ### Aspect-Matched Facts Attribute Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22%2Bcorrected-errata-2013-11-18 This snippet shows the renaming of the 'duplicates' attribute to 'matches'. This change reflects the shift from controlling duplicate facts to controlling aspect-matched facts within evaluation sequences for variables that bind as a sequence. ```XML ``` -------------------------------- ### Modify XBRL Functions for Dimension Value Testing (XBRL) Source: https://www.xbrl.org/specification/variables/rec-2009-06-22/variables-rec-2009-06-22+corrected-errata-2013-11-18 Modifies XBRL functions used for matching segment and scenario dimensions to remove the need for direct node retrieval for s-equal2 conditions, accommodating dimensions with default values. ```text Modified the XBRL functions used to test matches of segment and scenario dimensions to eliminate the need to directly obtain the nodes representing dimension values for the purposes of testing s-equal2 conditions. This is necessary given that some dimensions can have default values. ```