*** previous/variables.xml	2009-04-11 14:35:46.000000000 -0700
--- current/variables.xml	2009-04-11 14:34:53.000000000 -0700
***************
*** 37,44 ****
          <bibref ref="XBRL" />. It defines syntax for structures that 
          support the extraction and usage of information from an XBRL 
          instance and its supporting 
!         <xtermref bibref="XBRL" idref="_Toc156209104">discoverable 
!         taxonomy set</xtermref>.
        </p>
  
        <p>
--- 37,43 ----
          <bibref ref="XBRL" />. It defines syntax for structures that 
          support the extraction and usage of information from an XBRL 
          instance and its supporting 
!         <xtermref bibref="XBRL" idref="_3.2">discoverable taxonomy set</xtermref>.
        </p>
  
        <p>
***************
*** 72,78 ****
        <p>
          XBRL variables play an important role in extracting information
          from an XBRL instance or a 
!         <xtermref bibref="XBRL" idref="_Toc156209104">discoverable taxonomy set</xtermref>.
          XBRL variables can also be used to define constants and to define
          transformations of the information available in other variables.
        </p>
--- 71,77 ----
        <p>
          XBRL variables play an important role in extracting information
          from an XBRL instance or a 
!         <xtermref bibref="XBRL" idref="_3.2">discoverable taxonomy set</xtermref>.
          XBRL variables can also be used to define constants and to define
          transformations of the information available in other variables.
        </p>
***************
*** 84,100 ****
        </p>
  
        <p>
!         <definition id="term-target-xbrl-instance" term="target XBRL instance">
!           The <term>target XBRL instance</term> is the single XBRL instance 
            that variables are evaluated against in the processing model for 
            variables.
          </definition>
        </p>
        
        <p>
          The XPath expressions implied by variables 
          are evaluated using the <elt>xbrli:xbrl</elt> element of the 
!         <termref ref="term-target-xbrl-instance">target XBRL instance</termref>
          as the context item.
        </p>
  
--- 83,106 ----
        </p>
  
        <p>
!         <definition id="term-input-xbrl-instance" term="input XBRL instance">
!           The <term>input XBRL instance</term> is the single valid XBRL instance 
            that variables are evaluated against in the processing model for 
            variables.
          </definition>
        </p>
        
        <p>
+         Note that input XBRL instances are required to be valid with respect to the 
+         <termref ref="term-variable-set">variable set</termref> treating them as an input.  
+         They are required to be valid in the sense that they conform to the XBRL 2.1 specification 
+         and to any specification contributing to the definition of the variable set's aspect model.   
+       </p>
+       
+       <p>
          The XPath expressions implied by variables 
          are evaluated using the <elt>xbrli:xbrl</elt> element of the 
!         <termref ref="term-input-xbrl-instance">input XBRL instance</termref>
          as the context item.
        </p>
  
***************
*** 231,274 ****
          <head>XPath usage</head>
  
          <p>
!           Some attributes defined by this specification contain values
            that are evaluated as XPath 2.0 <bibref ref="XPATH2"/> expressions. 
            Wherever an XPath expression is mentioned in this specification it
!           refers to an XPath 2.0 expression. The evaluation context for
!           an XPath expression is determined by the attribute that
!           contains the expression. The statically known namespaces used
!           in the expressions are those that are in scope for the element
!           that has the attribute that contains the XPath expression.
!         </p>
! 
!         <p>
!           Evaluation of XPath expressions <rfc2119>MUST NOT</rfc2119> 
!           be performed using the XPath 1.0 compatibility mode.
          </p>
  
          <p>
-           QNames in each XPath expression MUST be resolvable using
-           namespace declarations that are in scope for the element that
-           contains the XPath expression. See Namespaces in XML <bibref ref="XMLNAMES"/>
-           for more information on namespace declarations and
-           their scope.
-         </p>
-         
-         <p>
-           The default function namespace is <val>http://www.w3.org/2005/xpath-functions</val>.
-           This means that functions in this namespace do not require a namespace prefix when they 
-           are called.
-         </p>
-         
-         <p>
            <definition id="term-evaluation-exception" term="evaluation exception">
              An <term>evaluation exception</term> is defined as any one of
              <xtermref bibref="XPATH2" idref="dt-static-error">a static error</xtermref>,
              <xtermref bibref="XPATH2" idref="dt-dynamic-error">a dynamic error</xtermref>, or
!             <xtermref bibref="XPATH2" idref="dt-type-error">a type error</xtermref>.
            </definition>
          </p>
  
        </section>
        
      </section>
--- 237,465 ----
          <head>XPath usage</head>
  
          <p>
!           Some attributes and elements, defined by this specification, contain values
            that are evaluated as XPath 2.0 <bibref ref="XPATH2"/> expressions. 
            Wherever an XPath expression is mentioned in this specification it
!           refers to an XPath 2.0 expression. 
          </p>
  
          <p>
            <definition id="term-evaluation-exception" term="evaluation exception">
              An <term>evaluation exception</term> is defined as any one of
              <xtermref bibref="XPATH2" idref="dt-static-error">a static error</xtermref>,
              <xtermref bibref="XPATH2" idref="dt-dynamic-error">a dynamic error</xtermref>, or
!             <xtermref bibref="XPATH2" idref="dt-type-error">a type error</xtermref> for 
!             an XPath expression.
            </definition>
          </p>
  
+         <p>
+           All of the <xtermref bibref="XDM" idref="intro">XQuery/XPath data models</xtermref> 
+           used for XPath processing <rfc2119>MUST</rfc2119> be constructed using the relevant
+           <xtermref bibref="XMLSCHEMA-STRUCTURES" idref="key-psvi">Post Schema Validation Infoset</xtermref>.
+         </p>
+         
+         <section id="sec-xpath-evaluation-context">
+           <head>XPath evaluation context</head>
+ 
+           <p>
+             The XPath specification <bibref ref="XPATH2"/> requires XPath expressions to be evaluated
+             in conjunction with an <xtermref bibref="XPATH2" idref="context">expression context</xtermref>.
+             This section specifies how the components of the expression context are to be initialised.
+           </p>
+            
+           <p>
+             <definition id="term-containing-element" term="containing element">
+               A <term>containing element</term> for an XPath expression 
+               is defined as the element containing the XPath expression, 
+               either as element content or as the content of an attribute 
+               on that element.
+             </definition>
+           </p>
+           
+           <p>
+             <definition id="term-enclosing-element" term="enclosing element">
+               An <term>enclosing element</term> for an XPath expression 
+               is the XPath expression's <termref ref="term-containing-element">containing element</termref> 
+               or any of its ancestors.
+             </definition>
+           </p>
+ 
+           <p>
+             The evaluation context for an XPath expression is determined by its 
+             <termref ref="term-containing-element">containing element</termref>. 
+           </p> 
+            
+           <p>
+             The components of the expression context divide into those in the <xtermref bibref="XPATH2" idref="static_context">static context</xtermref> 
+             and those <xtermref bibref="XPATH2" idref="eval_context">in the dynamic context</xtermref>. The 
+             initialisation of the static and dynamic contexts is set out in 
+             <sectionref ref="sec-xpath-static-context-initialisation"/> and
+             <sectionref ref="sec-xpath-dynamic-context-initialisation"/> respectively.  
+           </p>
+ 
+           <section id="sec-xpath-static-context-initialisation">
+ 
+             <head>XPath static context initialisation</head>
+ 
+             <p>
+               XPath 1.0 compatibility mode, a part of the static context, 
+               is always set to <val>false</val>. Thus, evaluation of XPath expressions 
+               <rfc2119>MUST NOT</rfc2119> be performed using the XPath 1.0 compatibility mode.
+             </p>
+               
+             <p> 
+               The static context also contains namespaces for variables, functions, elements and
+               attributes.
+             </p>
+             
+             <p>
+               The namespaces in the static context are those 
+               that are in scope for the 
+               <termref ref="term-containing-element">containing element</termref> 
+               of the XPath expression.
+             </p>
+               
+             <p>
+               The static context also contains the 
+               default function namespace which is <val>http://www.w3.org/2005/xpath-functions</val>.
+               This means that functions in this namespace do not require a namespace prefix when they 
+               are called.
+             </p>
+     
+             <p>
+               As required by 
+               <xtermref bibref="XPATH2" idref="id-variables">the XPath 2.0 Specification</xtermref>,
+               an unprefixed variable reference is to a variable that is in no namespace.  
+               Care needs to be taken to ensure that the default namespace for element and 
+               attribute names is not used when determining 
+               the QName for variables with no namespace prefix.
+             </p>
+ 
+             <p>
+               The default namespace, if any, associated
+               with the containing element is only to be 
+               used in determining the namespace of functions, 
+               element names, and attribute names, in the XPath expression, 
+               that have no namespace prefix.
+             </p>
+     
+             <p>
+               The XML Schema data type of attributes with values that are variable
+               QNames is <val>variable:QName</val>. This distinguishes those 
+               attributes from other elements and attributes containing QNames 
+               that have data type <var>xs:QName</var>. 
+               This distinction prevents the variable QName resolution method 
+               from defaulting to the resolution method for QNames with data 
+               type <val>xs:QName</val>. This is important because variable 
+               names with no namespace prefix are not to be resolved in the 
+               same way as other QNames with no namespace prefix.
+             </p>
+             
+             <p>
+               <error id="error-variable-name-resolution-failure">
+                 Error code <errorcode code="variableNameResolutionFailure"/> <rfc2119>MUST</rfc2119> be thrown
+                 if an attribute containing the QName of a 
+                 <termref ref="term-fact-variable">fact variable</termref> or
+                 <termref ref="term-general-variable">general variable</termref>
+                 specifies a namespace prefix that cannot be resolved
+                 to a namespace declaration that is in scope for the containing element.
+               </error>
+             </p>        
+     
+             <p>
+               QNames in each XPath expression <rfc2119>MUST</rfc2119> be resolvable using the
+               specific resolution rules set out in this specification and the
+               namespace declarations that are in scope for the XPath expression's 
+               containing element. See Namespaces in XML <bibref ref="XMLNAMES"/>
+               for more information on namespace declarations and
+               their scope.
+             </p>
+                         
+             <p>
+               The schema definitions in the XPath expression's static context are the 
+               those defined for the XML resource containing the XPath expression.
+             </p>
+ 
+             <p>
+               The specification sets out, where necessary how to determine the variables
+               that are in the static context for the XPath expression.
+             </p>
+             
+             <p>
+               The function signatures in the static context are 
+               the core functions defined in <bibref ref="XFUNCTIONS"/>, 
+               the functions defined in the XBRL function registry, 
+               the constructor functions for all the atomic types in the static 
+               context's schema definitions, and any extension functions bound 
+               using implementation-defined mechanisms.
+             </p>
+             
+             <p>
+               The statically known collations are implementation-defined. 
+               However, the set of in-scope collations must always include 
+               the Unicode codepoint collation, defined in 
+               <xtermref bibref="XFUNCTIONS" idref="string-compare">Section 7.3</xtermref> of 
+               <bibref ref="XFUNCTIONS"/>.
+               The default collation to be used by XPath operators and functions in the XPath expression 
+               is the unicode collation unless another is specified by a specific function argument.
+             </p>
+ 
+             <p>
+               The base URI in the static context is the base URI of the XPath expression's containing element. 
+               The concept of the <xtermref bibref="XDM" idref="dm-base-uri">base URI of a node</xtermref> 
+               is defined in the XQuery 1.0 and XPath 2.0 Data Model Specification <bibref ref="XDM"/>.
+             </p>
+             
+             <p>
+               There are no statically known documents in the static context. 
+             </p>
+ 
+             <p>
+               There are no statically known collections in the static context. 
+             </p>
+             
+           </section>
+ 
+           <section id="sec-xpath-dynamic-context-initialisation">
+             <head>XPath dynamic context initialisation</head>
+ 
+             <p>
+               The context item in the dynamic context is defined as part 
+               of the explanation of each XPath expression container.
+             </p>
+ 
+             <p>
+               The context position is <val>1</val>.
+               Likewise the context size is <val>1</val>.
+               This is because the context item is always in a sequence of one item.
+             </p>
+             
+             <p>
+               The dynamic context includes the values of the variables in the static context.
+             </p>
+             
+             <p>
+               The current date, time and timezone are implementation dependent parts of the dynamic
+               context.
+             </p>
+             
+             <p>
+               There are no available documents in the dynamic context. 
+             </p>
+ 
+             <p>
+               There are no available collections in the dynamic context. 
+             </p>
+             
+             <p>
+               The default collection, in the dynamic context, is the empty sequence.
+             </p>
+             
+           </section>
+           
+         </section>
+         
        </section>
        
      </section>
***************
*** 316,322 ****
          For two facts, an aspect test can be used to test whether an aspect is not
          reported for both facts or is reported with an equivalent value for both facts.
          The context item when evaluating all aspect tests is the 
!         <elt>xbrli:xbrl</elt> element of the target XBRL instance.
        </p>
  
        <p>
--- 507,513 ----
          For two facts, an aspect test can be used to test whether an aspect is not
          reported for both facts or is reported with an equivalent value for both facts.
          The context item when evaluating all aspect tests is the 
!         <elt>xbrli:xbrl</elt> element of the <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
        </p>
  
        <p>
***************
*** 330,339 ****
        </p>
  
        <p>
          In this specification, an aspect test is expressed in terms of 
          an XPath expression that contains two 
!         XPath variable references, one, <var>$a</var> for a variable that is equal
!         to the first fact in the comparison and the other, <var>$b</var> for the 
          variable that is equal to the second fact in the comparison.
        </p>
  
--- 521,538 ----
        </p>
  
        <p>
+         <definition id="term-aspect-matched-facts" term="aspect-matched fact">
+           Two facts are <term>aspect-matched facts</term> if they have exactly the same aspects and,
+           for each of aspect that they both have, the value for that aspect 
+           <termref ref="term-match">matches</termref> for the two facts.
+         </definition>
+       </p>
+ 
+       <p>
          In this specification, an aspect test is expressed in terms of 
          an XPath expression that contains two 
!         XPath variable references, one, <var>$aspectTest:a</var> for a variable that is equal
!         to the first fact in the comparison and the other, <var>$aspectTest:b</var> for the 
          variable that is equal to the second fact in the comparison.
        </p>
  
***************
*** 350,356 ****
              at the root of the XBRL instance to the element that is the fact itself.
            </definition>
            The aspect test for this aspect is: 
!           <code>$a/.. is $b/..</code>
          </item>
          <item>
            <definition id="term-concept-aspect" term="concept aspect">
--- 549,555 ----
              at the root of the XBRL instance to the element that is the fact itself.
            </definition>
            The aspect test for this aspect is: 
!           <code>$aspectTest:a/.. is $aspectTest:b/..</code>
          </item>
          <item>
            <definition id="term-concept-aspect" term="concept aspect">
***************
*** 358,364 ****
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>(namespace-uri($a) eq namespace-uri($b)) and (local-name($a) eq local-name($b))</code>
          </item>
        </ulist>
  
--- 557,563 ----
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>(namespace-uri($aspectTest:a) eq namespace-uri($aspectTest:b)) and (local-name($aspectTest:a) eq local-name($aspectTest:b))</code>
          </item>
        </ulist>
  
***************
*** 374,380 ****
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>(xfi:identifier-scheme($a) eq xfi:identifier-scheme($b)) and (xfi:identifier-value($a) eq xfi:identifier-value($b))</code>
          </item>
          <item>
            <definition id="term-period-aspect" term="period aspect">
--- 573,579 ----
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>(xfi:item-identifier-scheme($aspectTest:a) eq xfi:item-identifier-scheme($aspectTest:b)) and (xfi:identifier-value($aspectTest:a) eq xfi:identifier-value($aspectTest:b))</code>
          </item>
          <item>
            <definition id="term-period-aspect" term="period aspect">
***************
*** 382,456 ****
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:s-equal(xfi:period($a), xfi:period($b))</code>
          </item>
          <item>
            <definition id="term-complete-segment-aspect" term="complete segment aspect">
              The <term>complete segment aspect</term> is the complete content of the 
!             <xtermref bibref="XBRL" idref="_Toc156209164">segment</xtermref>, 
              without interpreting it using the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a segment is contained by the
!             <xtermref bibref="XBRL" idref="_Toc156209159">context</xtermref> of the fact.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:s-equal(xfi:segment($a), xfi:segment($b))</code>
          </item>
          <item>
            <definition id="term-nonxdt-segment-aspect" term="non-XDT segment aspect">
              The <term>non-XDT segment aspect</term> is the content of the 
!             <xtermref bibref="XBRL" idref="_Toc156209164">segment</xtermref>, 
              excluding content defined in the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a segment is contained by the
!             <xtermref bibref="XBRL" idref="_Toc156209159">context</xtermref> of the fact.
!           </definition> 
!           The aspect test for this aspect is: 
!           <code> xfi:s-equal(xfi:segment-remainder($a), xfi:segment-remainder($b))</code>
!         </item>
!         <item>
!           <definition id="term-segment-dimension-aspect" term="segment dimension aspect">
!             <term>Segment dimension aspects</term> are 
!             <xtermref bibref="DIMENSIONS" idref="_3">XBRL dimensions</xtermref>
!             that are reported in the fact's
!             <xtermref bibref="XBRL" idref="_Toc156209164">segment</xtermref>.
!           </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:facts-segment-dimension-s-equal2($a,$b,#dimension)</code>
!           where <val>#dimension</val> is the QName of the dimension for which the aspect is defined.
          </item>
          <item>
            <definition id="term-complete-scenario-aspect" term="complete scenario aspect">
              The <term>complete scenario aspect</term> is the complete content of the 
!             <xtermref bibref="XBRL" idref="_Toc156209165">scenario</xtermref>, 
              without interpreting it using the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a scenario is contained by the
!             <xtermref bibref="XBRL" idref="_Toc156209159">
!             context</xtermref> of the fact.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:s-equal(xfi:scenario($a), xfi:scenario($b))</code>
          </item>
          <item>
            <definition id="term-nonxdt-scenario-aspect" term="non-XDT scenario aspect">
              The <term>non-XDT scenario aspect</term> is the content of the 
!           <xtermref bibref="XBRL" idref="_Toc156209165">scenario</xtermref>, 
              excluding content defined in the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a scenario is contained by the context of the fact.
            </definition> 
            The aspect test for this aspect is: 
!           <code> xfi:s-equal(xfi:scenario-remainder($a), xfi:scenario-remainder($b))</code>
          </item>
          <item>
!           <definition id="term-scenario-dimension-aspect" term="scenario dimension aspect">
!             <term>Scenario dimension aspects</term> are 
              <xtermref bibref="DIMENSIONS" idref="_3">XBRL dimensions</xtermref>
              that are reported in the fact's
!             <xtermref bibref="XBRL" idref="_Toc156209165">scenario</xtermref>.
            </definition> 
!           The aspect test for this aspect is: 
!           <code>xfi:facts-scenario-dimension-s-equal2($a,$b,#dimension)</code>
!           where <val>#dimension</val> is the QName of the dimension for which the aspect is defined.
          </item>
!     </ulist>
  
        <p>
          This specification defines the following aspect for 
--- 581,644 ----
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:nodes-correspond(xfi:period($aspectTest:a), xfi:period($aspectTest:b))</code>
          </item>
          <item>
            <definition id="term-complete-segment-aspect" term="complete segment aspect">
              The <term>complete segment aspect</term> is the complete content of the 
!             <xtermref bibref="XBRL" idref="_4.7.3.2">segment</xtermref>, 
              without interpreting it using the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a segment is contained by the
!             <xtermref bibref="XBRL" idref="_4.7">context</xtermref> of the fact.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:nodes-correspond(xfi:segment($aspectTest:a), xfi:segment($aspectTest:b))</code>
          </item>
          <item>
            <definition id="term-nonxdt-segment-aspect" term="non-XDT segment aspect">
              The <term>non-XDT segment aspect</term> is the content of the 
!             <xtermref bibref="XBRL" idref="_4.7.3.2">segment</xtermref>, 
              excluding content defined in the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a segment is contained by the
!             <xtermref bibref="XBRL" idref="_4.7">context</xtermref> of the fact.
!           </definition>
            The aspect test for this aspect is: 
!           <code> xfi:nodes-correspond(xfi:fact-segment-remainder($aspectTest:a), xfi:fact-segment-remainder($aspectTest:b))</code>
          </item>
          <item>
            <definition id="term-complete-scenario-aspect" term="complete scenario aspect">
              The <term>complete scenario aspect</term> is the complete content of the 
!             <xtermref bibref="XBRL" idref="_4.7.4">scenario</xtermref>, 
              without interpreting it using the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a scenario is contained by the
!             <xtermref bibref="XBRL" idref="_4.7">context</xtermref> 
!             of the fact.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:nodes-correspond(xfi:scenario($aspectTest:a), xfi:scenario($aspectTest:b))</code>
          </item>
          <item>
            <definition id="term-nonxdt-scenario-aspect" term="non-XDT scenario aspect">
              The <term>non-XDT scenario aspect</term> is the content of the 
!           <xtermref bibref="XBRL" idref="_4.7.4">scenario</xtermref>, 
              excluding content defined in the XBRL Dimensions Specification <bibref ref="DIMENSIONS"/>,
              if a scenario is contained by the context of the fact.
            </definition> 
            The aspect test for this aspect is: 
!           <code> xfi:nodes-correspond(xfi:fact-scenario-remainder($aspectTest:a), xfi:fact-scenario-remainder($aspectTest:b))</code>
          </item>
          <item>
!           <definition id="term-dimension-aspect" term="dimension aspect">
!             <term>Dimension aspects</term> are 
              <xtermref bibref="DIMENSIONS" idref="_3">XBRL dimensions</xtermref>
              that are reported in the fact's
!             <xtermref bibref="XBRL" idref="_4.7.3.2">segment</xtermref> or 
!             <xtermref bibref="XBRL" idref="_4.7.4">scenario</xtermref>.
            </definition> 
!           The details of aspect tests for dimension aspects are provided 
!           in <sectionref ref="sec-dimension-aspect-tests"/>.
          </item>
!       </ulist>
  
        <p>
          This specification defines the following aspect for 
***************
*** 461,476 ****
          <item>
            <definition id="term-unit-aspect" term="unit aspect">
              The <term>unit aspect</term> is the 
!             <xtermref bibref="XBRL" idref="_Toc156209166">unit</xtermref> 
              of the fact.
            </definition> 
            The aspect test for this aspect is: 
            <code>
!             xfi:s-equal(xfi:unit($a), xfi:unit($b))
            </code>
          </item>
        </ulist>
  
        <section id="sec-aspect-model">
          <head>Aspect models</head>
  
--- 649,1020 ----
          <item>
            <definition id="term-unit-aspect" term="unit aspect">
              The <term>unit aspect</term> is the 
!             <xtermref bibref="XBRL" idref="_4.8">unit</xtermref> 
              of the fact.
            </definition> 
            The aspect test for this aspect is: 
            <code>
!             xfi:nodes-correspond(xfi:unit($aspectTest:a), xfi:unit($aspectTest:b))
            </code>
          </item>
        </ulist>
  
+       <section id="sec-dimension-aspect-tests">
+         <head>Dimension aspect tests</head>
+ 
+         <p>
+           <definition id="term-dimension-aspect-test" term="dimension aspect test">
+             A <term>dimension aspect test</term> is an aspect test for a 
+             <termref ref="term-dimension-aspect">dimension aspect</termref>.
+           </definition>
+         </p>
+          
+         <p>
+           Dimension aspect tests depend on whether the is an 
+           <xtermref bibref="DIMENSIONS" idref="_2.5.3">explicit dimension</xtermref> or a 
+           <xtermref bibref="DIMENSIONS" idref="_2.5.2">typed dimension</xtermref>, 
+           and, if the dimension is a typed dimension, whether a 
+           <termref ref="term-equality-definition">equality definition</termref>
+           has been associated with the 
+           <termref ref="term-typed-dimension-domain-definition">typed-dimension domain definition</termref>
+           of the typed dimension.
+         </p>
+ 
+         <section id="sec-explicit-dimension-aspect-tests">
+           <head>Explicit-dimension aspect tests</head>
+         
+           <p>
+             <definition id="term-explicit-dimension-aspect-test" term="explicit-dimension aspect test">
+               An <term>explicit-dimension aspect test</term> is a dimension aspect test for an 
+               <xtermref bibref="DIMENSIONS" idref="_2.5.3">explicit dimension</xtermref>.
+             </definition>
+           </p>
+           
+           <p>
+             Explicit-dimension aspect tests are:
+           </p>
+ 
+           <p>
+             <code>
+                 xfi:nodes-correspond(xfi:fact-explicit-dimension-value($aspectTest:a,#dimension),xfi:fact-explicit-dimension-value($aspectTest:b,#dimension))
+             </code>
+           </p>
+           
+           <p>
+             where <var>$aspectTest:a</var> and <var>$aspectTest:b</var> are defined as in <sectionref ref="sec-aspects"/>, and
+             <val>#dimension</val> is the QName of the dimension defining the aspect.
+           </p>
+ 
+         </section>
+ 
+         <section id="sec-typed-dimension-aspect-tests">
+           <head>Typed-dimension aspect tests</head>
+ 
+           <p>
+             <definition id="term-typed-dimension-aspect-test" term="typed-dimension aspect test">
+               A <term>typed-dimension aspect test</term> is a dimension aspect test for a 
+               <xtermref bibref="DIMENSIONS" idref="_2.5.2">typed dimension</xtermref>.
+             </definition>
+           </p>          
+ 
+           <p>
+             <definition id="term-typed-dimension-value" term="typed-dimension value">
+               A <term>typed dimension value</term> is a value of a typed dimension 
+               in an XBRL instance.  Syntactically, it is the single XML fragment with root 
+               element that is the child element of the typed-dimension's
+               <xtermref bibref="DIMENSIONS" idref="_2.5">dimension container</xtermref>.
+             </definition>
+           </p>
+ 
+           <p>
+             Typed-dimension aspect tests are tests of equality between typed dimension values for
+             the same typed dimension.
+           </p>
+ 
+           <p>
+             <definition id="term-typed-dimension-domain-definition" term="typed-dimension domain definition">
+               A <term>typed-dimension domain definition</term> is the element in an XML Schema that defines
+               the content model for a typed dimension and that is identified as such by an
+               <att>xbrldt:typedDomainRef</att> attribute on the XML Schema element declaring 
+               a typed dimension.
+             </definition>
+           </p>
+ 
+           <p>
+             Note that <bibref ref="DIMENSIONS"/> allows more than one typed dimension to 
+             use the same typed-dimension domain definition. 
+           </p>
+ 
+           <p>
+             Typed-dimension aspect tests depend upon whether 
+             the typed dimension defining the dimension aspect
+             has a <term>typed-dimension domain definition</term> 
+             that, itself, has an 
+             <termref ref="term-equality-definition">equality definition</termref>.
+           </p>
+         
+           <p>
+             <definition id="term-default-typed-dimension-aspect-test" term="default-typed-dimension aspect test">
+               A <term>default typed-dimension aspect test</term> is a typed-dimension aspect test for a 
+               <xtermref bibref="DIMENSIONS" idref="_2.5.2">typed dimension</xtermref> that does not have an
+               <termref ref="term-equality-definition">equality definition</termref> associated with its
+               <termref ref="term-typed-dimension-domain-definition">typed-dimension domain definition</termref>.
+             </definition>
+           </p>
+ 
+           <p>
+             <definition id="term-custom-typed-dimension-aspect-test" term="custom typed-dimension aspect test">
+               A <term>custom typed-dimension aspect test</term> is a typed-dimension aspect test for a 
+               <xtermref bibref="DIMENSIONS" idref="_2.5.2">typed dimension</xtermref> that does have an
+               <termref ref="term-equality-definition">equality definition</termref> associated with its
+               <termref ref="term-typed-dimension-domain-definition">typed-dimension domain definition</termref>.
+             </definition>
+           </p>
+ 
+           <section id="sec-default-typed-dimension-aspect-tests">
+             <head>Default typed-dimension aspect tests</head>
+ 
+             <p>
+               <definition id="term-same-name" term="same name">
+                 Two element/attribute nodes, <val>A</val> and <val>B</val> 
+                 have the <term>same name</term> if either they both have QName names, 
+                 <val>Aqn</val> and <val>Bqn</val>, and 
+                 the XPath 2.0 expression <code>(Aqn eq Bqn)</code> evaluates to an effective 
+                 Boolean value of true when using the empty sequence as the context item; 
+                 or they both have names that are not defined in any namespace, 
+                 <val>An</val> and <val>Bn</val>, and 
+                 the XPath 2.0 expression <code>(An eq Bn)</code> evaluates to an effective 
+                 Boolean value of <val>true</val> when using the empty sequence as the context item.
+               </definition>
+             </p>
+ 
+             <p>
+               <definition id="term-corresponding-attributes" term="corresponding attributes">
+                 Two attribute nodes, <val>A</val> and <val>B</val>, 
+                 are <term>corresponding attributes</term> 
+                 if the following conditions are all satisfied:
+               </definition>
+             </p>
+ 
+             <ulist>
+                 <item>
+                   <val>A</val> and <val>B</val> have the <termref ref="term-same-name">same name</termref>                
+                 </item>
+                 <item>
+                   The sequences of atomic values obtained by atomizing <val>A</val> and <val>B</val>, 
+                   <val>As</val> and <val>Bs</val>, 
+                   are the same length and for each item <val>Ai</val>, at position <val>i</val> in 
+                   <val>As</val>, the item <val>Bi</val> at position <val>i</val> in <val>Bs</val>, 
+                   is such that the XPath 2.0 expression <code>(Ai eq Bi)</code> evaluates to an effective 
+                   Boolean value of <val>true</val> when using the empty sequence as the context item. 
+                 </item>
+             </ulist>
+ 
+             <p>
+               Note that if the attribute nodes, <val>A</val> and <val>B</val>, both atomize to 
+               empty sequences then those attribute nodes correspond. 
+             </p>
+ 
+             <p>
+               <definition id="term-corresponding-elements" term="corresponding elements">
+                 Two element nodes, <val>A</val> and <val>B</val>, 
+                 are <term>corresponding elements</term>
+                 if the following conditions are all satisfied:
+               </definition>
+             </p>
+ 
+             <ulist>
+                 <item>
+                   <val>A</val> and <val>B</val> have the <termref ref="term-same-name">same name</termref>                
+                 </item>
+                 <item>
+                   The sequences of atomic values obtained by atomizing <val>A</val> and <val>B</val>, 
+                   <val>As</val> and <val>Bs</val>, 
+                   are the same length and for each item <val>Ai</val>, at position <val>i</val> in 
+                   <val>As</val>, the item <val>Bi</val> at position <val>i</val> in <val>Bs</val>, 
+                   is such that the XPath 2.0 expression <code>(Ai eq Bi)</code> evaluates to an effective 
+                   Boolean value of <val>true</val> when using the empty sequence as the context item. 
+                 </item>
+                 <item>
+                   <val>A</val> and <val>B</val> have the same number of attributes<footnote>Note that namespace declarations are not included in the count of attributes.</footnote>
+                 </item>
+                 <item>
+                   For each attribute on element node <val>A</val>, there is a 
+                   <termref ref="term-corresponding-attributes">corresponding attribute</termref> 
+                   on element node <val>B</val>.
+                 </item>
+                 <item>
+                   <val>A</val> and <val>B</val> have the same number of child elements.
+                 </item>
+                 <item>
+                   For each child element of element node <val>A</val>, <val>Ac</val>,
+                   there is a <termref ref="term-corresponding-attributes">corresponding child element</termref> 
+                   of element node <val>B</val>, <val>Bc</val>, such that <val>Ac</val> and <val>Bc</val> have 
+                   the same number of preceding sibling elements.
+                 </item>
+             </ulist>
+ 
+             <p>
+               Note that, as for attribute nodes, if the element nodes, 
+               <val>A</val> and <val>B</val>, both atomize to 
+               empty sequences then those element nodes correspond. 
+             </p>
+ 
+             <p>
+               <definition id="term-corresponding-typed-dimension-values" term="corresponding typed-dimension values">
+                 Two <termref ref="term-typed-dimension-value">typed dimension values</termref> 
+                 are <term>corresponding typed-dimension values</term> 
+                 if they are values for the same typed dimension and 
+                 their root elements correspond.
+               </definition>
+             </p>
+ 
+             <p>
+               The default typed-dimension aspect test is:
+             </p>
+ 
+             <p>
+               <code>
+               (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]))
+               </code>
+             </p>
+ 
+             <p>
+               where <var>$aspectTest:a</var> and <var>$aspectTest:b</var> are defined as in <sectionref ref="sec-aspects"/>, and
+               <val>#dimension</val> is the QName of the dimension defining the aspect.
+             </p>
+ 
+           </section>
+ 
+           <section id="sec-custom-typed-dimension-aspect-tests">
+             <head>Custom typed-dimension aspect tests</head>
+             
+             <p>
+               The custom typed-dimension aspect test is:
+             </p>
+ 
+             <p>
+               <code>
+               (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)
+               </code>
+             </p>
+ 
+             <p>
+               where <var>$aspectTest:a</var> and <var>$aspectTest:b</var> are defined as in <sectionref ref="sec-aspects"/>,
+               <val>#dimension</val> is the QName of the dimension defining the aspect, and <val>#custom</val> is the XPath expression contained by the <att>test</att> attribute on the 
+               <termref ref="term-equality-definition">equality definition</termref> that <rfc2119>MUST</rfc2119>
+               be associated with the 
+               <termref ref="term-typed-dimension-domain-definition">typed-dimension's domain definition</termref>
+               if the custom typed-dimension aspect test is to be applicable. 
+             </p>
+             
+             <section id="sec-equality-definitions-for-typed-dimensions">
+               <head>Equality definitions for typed dimensions</head>
+ 
+               <p>
+                 <definition id="term-equality-definition" term="equality definition">
+                   An <term>equality definition</term> is a definition of equality between any two values in a 
+                   <termref ref="term-typed-dimension-domain-definition">typed-dimension's domain definition</termref>.
+                   It is expressed by a <elt>variable:equalityDefinition</elt> element. 
+                 </definition>
+               </p>
+       
+               <p>
+                 The syntax for the
+                 <xmlref ref="xml-equality-definition"><elt>variable:equalityDefinition</elt></xmlref>
+                 element is defined by the normative schema supplied with this specification.
+               </p>
+               
+               <p>
+                 The content of the <att>test</att> attribute on 
+                 an <termref ref="term-equality-definition">equality definition</termref>
+                 is an XPath expression that is incorporated into the custom typed-dimension aspect tests
+                 of those typed dimensions that use the 
+                 <termref ref="term-typed-dimension-domain-definition">typed-dimension domain definitions</termref>
+                 that are related to the equality definition by 
+                 <termref ref="term-equality-definition-relationship">equality-definition relationships</termref>.
+               </p>
+ 
+               <p>
+                 The variable <var>$aspectTest:a</var>, when used in the XPath expression contained by an 
+                 equality definition, is equal to the first fact in the comparison of aspect values and
+                 the variable <var>$aspectTest:b</var>, when used in the XPath expression contained by an 
+                 equality definition, is equal to the second fact in the comparison of aspect values.                 
+               </p>
+ 
+               <p>
+                 <error id="error-multiple-typed-dimension-equality-definitions">
+                   Error code 
+                   <errorcode code="multipleTypedDimensionEqualityDefinitions"/>
+                   <rfc2119>MUST</rfc2119> be thrown 
+                   if a typed-dimension domain definition has more than one 
+                   equality-definition relationship to an equality definition.
+                 </error>
+               </p>
+       
+               <section id="sec-equality-definition-relationships">
+                 <head>Equality-definition relationships</head>
+     
+                 <p>
+                   <definition id="term-equality-definition-relationship" term="equality-definition relationship">
+                     An <term>equality-definition relationship</term> 
+                     is a relationship between a
+                     <termref ref="term-typed-dimension-domain-definition">typed-dimension domain definition</termref> 
+                     and an <termref ref="term-equality-definition">equality definition</termref> 
+                     expressed by an <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
+                   </definition>
+                 </p>
+               
+                 <p>
+                   To declare an equality-definition relationship an
+                   XLink arc <rfc2119>MUST</rfc2119>:
+                 </p>
+                 
+                 <ulist>
+                   <item>
+                     have an 
+                     <xtermref bibref="XBRL" idref="_3.5.3.9">arcrole value</xtermref> 
+                     equal to <val>http://xbrl.org/arcrole/2008/equality-definition</val>
+                   </item>
+                   <item>
+                     have a typed-dimension domain definition at the 
+                     <xtermref bibref="XLINK" idref="dt-starting-resource">starting resource of the arc</xtermref>
+                   </item>
+                   <item>
+                     have an equality definition at the 
+                     <xtermref bibref="XLINK" idref="dt-ending-resource">ending resource of the arc</xtermref>
+                   </item>
+                 </ulist>
+     
+                 <p>
+                   The arcrole value, 
+                   <xmlref ref="equality-definition"><val>http://xbrl.org/arcrole/2008/equality-definition</val></xmlref>,
+                   is declared in the normative schema supplied with this specification.
+                 </p>
+     
+                 <p>
+                   Equality-definition relationships <rfc2119>MUST</rfc2119>
+                   be expressed by 
+                   <xtermref bibref="GENERIC" idref="term-generic-arc">generic arcs</xtermref>.
+                   Violations of this requirement can be 
+                   detected by validation against the XBRL Specification
+                   <bibref ref="XBRL"/>. 
+                 </p>
+             
+               </section><!-- Equality definition relationships -->
+ 
+             </section><!-- Equality definitions -->
+             
+           </section><!-- Custom typed dimension aspect tests -->
+ 
+         </section><!-- typed dimension aspect tests -->
+         
+       </section><!-- Dimension aspect tests -->
+ 
        <section id="sec-aspect-model">
          <head>Aspect models</head>
  
***************
*** 525,556 ****
          </p>
  
          <p>
!           This specification defines two aspect models: the dimensional aspect model and the
!           non-dimensional aspect model.
          </p>
          <p>
!           <definition id="term-dimensional-aspect-model" term="dimensional aspect model">
!             The <term>dimensional aspect model</term> includes all of the aspects defined in this
!             specification except for 
!             <termref ref="term-complete-segment-aspect">the complete segment aspect</termref> and 
!             <termref ref="term-complete-scenario-aspect">the complete scenario aspect</termref>. 
!             The dimensional aspect model has an aspect model identifier equal to <val>dimensional</val>.
            </definition>
          </p>
  
          <p>
            <definition id="term-non-dimensional-aspect-model" term="non-dimensional aspect model">
              The <term>non-dimensional aspect model</term> includes all of the aspects defined in this
              specification except for 
              <termref ref="term-nonxdt-segment-aspect">the non-XDT segment aspect</termref>,
!             <termref ref="term-nonxdt-scenario-aspect">the non-XDT scenario aspect</termref>,
!             <termref ref="term-segment-dimension-aspect">the segment dimension aspect</termref>, and 
!             <termref ref="term-scenario-dimension-aspect">the scenario dimension aspect</termref>.
              The non-dimensional aspect model has an aspect model identifier equal to <val>non-dimensional</val>.
            </definition>
          </p>
  
          <p>
            The dimensional and non-dimensional aspect models are summarised in 
            <tableref ref="table-aspect-models"/>.
          </p>
--- 1069,1175 ----
          </p>
  
          <p>
!           <definition id="term-open-context-component" term="open context component (OCC)">
!             An <term>open context component (OCC)</term>, is a 
!             <xtermref bibref="XBRL" idref="_4.7.3.2">segment</xtermref> 
!             or <xtermref bibref="XBRL" idref="_4.7.4">scenario</xtermref>.
!           </definition>
          </p>
+ 
          <p>
!           <definition id="term-segment-occ" term="segment OCC">
!             A <term>segment OCC</term> is the OCC for a segment.
            </definition>
          </p>
  
          <p>
+           <definition id="term-scenario-occ" term="scenario OCC">
+             A <term>scenario OCC</term> is the OCC for a scenario.
+           </definition>
+         </p>
+ 
+         <p>
+           <definition id="term-occ-aspect" term="OCC aspect">
+             An <term>OCC aspect</term>, is an aspect with a value that is reported
+             by the content of an <termref ref="term-open-context-component">OCC</termref>
+             that remains after removing all content corresponding to other aspect values.
+           </definition>
+         </p>
+ 
+         <p>
+           <definition id="term-occ-value" term="OCC value">
+             An <term>OCC value</term> is the value of an OCC aspect.
+           </definition>
+         </p>
+ 
+         <p>
+           <definition id="term-segment-occ-aspect" term="segment OCC aspect">
+             A <term>segment OCC aspect</term>, is the OCC aspect with a value given by the remainder
+             content of the segment.
+           </definition>
+         </p>
+         
+         <p>
+           <definition id="term-scenario-occ-aspect" term="scenario OCC aspect">
+             A <term>scenario OCC aspect</term>, is the OCC aspect with a value given by the remainder
+             content of the segment.
+           </definition>
+         </p>
+ 
+         <p>
+           Because <bibref ref="XBRL"/> places so few constraints on
+           the content and meaning of OCCs, all aspect models <rfc2119>MUST</rfc2119> 
+           include two aspects: one segment OCC aspect, and one scenario OCC aspect.
+           Moreover, all aspect model definitions <rfc2119>MUST</rfc2119> identify their
+           segment OCC aspect and their scenario OCC aspect.
+         </p>
+ 
+         <p>
+           This specification defines two aspect models: the non-dimensional aspect model and the
+           dimensional aspect model.
+         </p>
+ 
+         <p>
            <definition id="term-non-dimensional-aspect-model" term="non-dimensional aspect model">
              The <term>non-dimensional aspect model</term> includes all of the aspects defined in this
              specification except for 
              <termref ref="term-nonxdt-segment-aspect">the non-XDT segment aspect</termref>,
!             <termref ref="term-nonxdt-scenario-aspect">the non-XDT scenario aspect</termref>, and
!             <termref ref="term-dimension-aspect">dimension aspects</termref>.
              The non-dimensional aspect model has an aspect model identifier equal to <val>non-dimensional</val>.
            </definition>
          </p>
  
          <p>
+           <definition id="term-dimensional-aspect-model" term="dimensional aspect model">
+             The <term>dimensional aspect model</term> includes all of the aspects defined in this
+             specification except for 
+             <termref ref="term-complete-segment-aspect">the complete segment aspect</termref> and 
+             <termref ref="term-complete-scenario-aspect">the complete scenario aspect</termref>. 
+             The dimensional aspect model has an aspect model identifier equal to <val>dimensional</val>.
+           </definition>
+         </p>
+         
+         <p>
+           Input XBRL instances for variable sets using the non-dimensional aspect model are only 
+           required to conform to the XBRL 2.1 specification <bibref ref="XBRL"/>.
+           Input XBRL instances for variable sets using the dimensional aspect model are also required to
+           conform to the XBRL Dimensions specification <bibref ref="DIMENSIONS"/>. 
+         </p>
+ 
+         <p>
+           The complete segment aspect is the segment OCC aspect for the
+           non-dimensional aspect model. The complete scenario aspect is
+           the scenario OCC aspect for the non-dimensional aspect model.
+         </p>
+ 
+         <p>
+           The non-XDT segment aspect is the segment OCC aspect for the
+           dimensional aspect model. The non-XDT scenario aspect is the
+           scenario OCC aspect for the dimensional aspect model.
+         </p>
+         
+         <p>
            The dimensional and non-dimensional aspect models are summarised in 
            <tableref ref="table-aspect-models"/>.
          </p>
***************
*** 585,626 ****
                <td>include</td>
              </tr>
              <tr>
!               <th>Period</th>
                <td>include</td>
                <td>include</td>
              </tr>
              <tr>
!               <th>Unit</th>
                <td>include</td>
                <td>include</td>
              </tr>
              <tr>
!               <th>Complete segment</th>
                <td>exclude</td>
                <td>include</td>
              </tr>
              <tr>
!               <th>Complete scenario</th>
                <td>exclude</td>
                <td>include</td>
              </tr>
              <tr>
!               <th>Non-XDT segment</th>
!               <td>include</td>
!               <td>exclude</td>
!             </tr>
!             <tr>
!               <th>Non-XDT scenario</th>
                <td>include</td>
                <td>exclude</td>
              </tr>
              <tr>
!               <th>Segment dimension</th>
                <td>include</td>
                <td>exclude</td>
              </tr>
              <tr>
!               <th>Scenario dimension</th>
                <td>include</td>
                <td>exclude</td>
              </tr>
--- 1204,1240 ----
                <td>include</td>
              </tr>
              <tr>
!               <td>Period</td>
                <td>include</td>
                <td>include</td>
              </tr>
              <tr>
!               <td>Unit</td>
                <td>include</td>
                <td>include</td>
              </tr>
              <tr>
!               <td>Complete segment</td>
                <td>exclude</td>
                <td>include</td>
              </tr>
              <tr>
!               <td>Complete scenario</td>
                <td>exclude</td>
                <td>include</td>
              </tr>
              <tr>
!               <td>Non-XDT segment</td>
                <td>include</td>
                <td>exclude</td>
              </tr>
              <tr>
!               <td>Non-XDT scenario</td>
                <td>include</td>
                <td>exclude</td>
              </tr>
              <tr>
!               <td>Dimension</td>
                <td>include</td>
                <td>exclude</td>
              </tr>
***************
*** 643,651 ****
            <definition id="term-custom-function" term="custom function">
              A <term>custom function</term> is an XPath function that is not
              defined in the XPath and XQuery Functions Specification 
!             <bibref ref="XFUNCTIONS"/>.
            </definition>
          </p>
  
          <p>
            <definition id="term-custom-function-signature" term="custom function signature">
--- 1257,1276 ----
            <definition id="term-custom-function" term="custom function">
              A <term>custom function</term> is an XPath function that is not
              defined in the XPath and XQuery Functions Specification 
!             <bibref ref="XFUNCTIONS"/> and that is also not defined in the XBRL Functions registry.
            </definition>
          </p>
+         
+         <p>
+           <error id="error-custom-function-using-prohibited-namespace">
+             Error code 
+             <errorcode code="noProhibitedNamespaceForCustomFunction"/>
+             <rfc2119>MUST</rfc2119> be thrown 
+             if a custom function has the namespace
+             <code>http://www.xbrl.org/2008/function/instance</code>,
+             which is reserved for functions in the XBRL functions registry.
+           </error>
+         </p>
  
          <p>
            <definition id="term-custom-function-signature" term="custom function signature">
***************
*** 697,703 ****
  
          <p>
            The ordering of the custom function's input parameters matches
!           the document order of the <elt>variable:input</elt>child elements
            of the custom function signature.
          </p>
          
--- 1322,1328 ----
  
          <p>
            The ordering of the custom function's input parameters matches
!           the document order of the <elt>variable:input</elt> child elements
            of the custom function signature.
          </p>
          
***************
*** 741,747 ****
              <errorcode code="parameterNameClash"/>
              <rfc2119>MUST</rfc2119> be thrown 
              if two parameters in the one 
!             <xtermref bibref="XBRL" idref="_Toc156209104">discoverable taxonomy set</xtermref>
              have the same QName specified by their <att>name</att>
              attributes.
            </error>
--- 1366,1372 ----
              <errorcode code="parameterNameClash"/>
              <rfc2119>MUST</rfc2119> be thrown 
              if two parameters in the one 
!             <xtermref bibref="XBRL" idref="_3.2">discoverable taxonomy set</xtermref>
              have the same QName specified by their <att>name</att>
              attributes.
            </error>
***************
*** 808,814 ****
            content of the <att>select</att> attribute on the general 
            variable. The context node for evaluation of the 
            XPath expression is the <elt>xbrli:xbrl</elt> element of the 
!           <termref ref="term-target-xbrl-instance">target XBRL instance</termref>.
          </p>
  
          <p>
--- 1433,1439 ----
            content of the <att>select</att> attribute on the general 
            variable. The context node for evaluation of the 
            XPath expression is the <elt>xbrli:xbrl</elt> element of the 
!           <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
          </p>
  
          <p>
***************
*** 853,860 ****
          </p>
  
          <p>
!           The XPath expression implied by a fact variable begins with:
          </p>
          <p>
            <code>xfi:facts-in-instance()</code>
          </p>
--- 1478,1496 ----
          </p>
  
          <p>
!           If the <att>nils</att> attribute on a fact variable is omitted or is equal to <val>false</val> 
!           then the XPath expression implied by a fact variable begins with:
!         </p>
! 
!         <p>
!           <code>xfi:non-nil-facts-in-instance()</code>
!         </p>
! 
!         <p>
!           If the <att>nils</att> attribute on a fact variable is equal to <val>true</val> 
!           then the XPath expression implied by a fact variable begins with:
          </p>
+ 
          <p>
            <code>xfi:facts-in-instance()</code>
          </p>
***************
*** 864,869 ****
--- 1500,1506 ----
            <xtermref bibref="XPATH2" idref="dt-predicate">XPath predicate</xtermref> 
            that filters the facts in the sequence
            produced by the <code>xfi:facts-in-instance()</code> 
+           function or the <code>xfi:non-nil-facts-in-instance()</code> 
            function.
            The expression in the XPath predicate includes an 
            XPath expression implied by each of the fact variable's filters.
***************
*** 880,886 ****
  
          <p>
            The XPath expression implied by a filter complement is the 
!           <xtermref bibref="XFUNCTIONS" idref="fn-not"><code>fn:not()</code></xtermref> 
            function applied to the XPath expression implied by a filter.
          </p>
  
--- 1517,1523 ----
  
          <p>
            The XPath expression implied by a filter complement is the 
!           <xtermref bibref="XFUNCTIONS" idref="func-not"><code>fn:not()</code></xtermref> 
            function applied to the XPath expression implied by a filter.
          </p>
  
***************
*** 913,934 ****
            <p>
              <definition id="term-filter" term="filter">
              A <term>filter</term> defines selection criteria 
!             for facts in the target XBRL instance.
              </definition>
            </p>
  
            <p> 
!             <definition id="term-target-fact" term="target fact">
!                A <term>target fact</term> is a fact in the 
!                <termref ref="term-target-xbrl-instance">target 
                 XBRL instance</termref> that is being filtered.
              </definition> 
            </p>
  
            <p>
!             Filters express criteria that can be applied to target facts. 
!             Such criteria are incorporated into the
!             XPath expressions implied by fact variables.
            </p>
  
            <p>
--- 1550,1571 ----
            <p>
              <definition id="term-filter" term="filter">
              A <term>filter</term> defines selection criteria 
!             for facts in the <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
              </definition>
            </p>
  
            <p> 
!             <definition id="term-input-fact" term="input fact">
!                An <term>input fact</term> is a fact in the 
!                <termref ref="term-input-xbrl-instance">input 
                 XBRL instance</termref> that is being filtered.
              </definition> 
            </p>
  
            <p>
!             Filters express criteria that can be applied to target
!             facts. Such criteria are incorporated into the XPath
!             expressions implied by fact variables.
            </p>
  
            <p>
***************
*** 1020,1030 ****
            </p>
  
            <p>
-             A <termref ref="term-filter-complement">filter complement</termref> 
-             never covers an aspect.
-           </p>
-           
-           <p>
              Filters <rfc2119>MAY</rfc2119> be associated with fact variables
              in the following three ways:
            </p>
--- 1657,1662 ----
***************
*** 1077,1083 ****
              <ulist>
                <item>
                  have an 
!                 <xtermref bibref="XBRL" idref="_Toc156209129">arcrole value</xtermref> 
                  equal to <val>http://xbrl.org/arcrole/2008/variable-filter</val>
                </item>
                <item>
--- 1709,1715 ----
              <ulist>
                <item>
                  have an 
!                 <xtermref bibref="XBRL" idref="_3.5.3.9">arcrole value</xtermref> 
                  equal to <val>http://xbrl.org/arcrole/2008/variable-filter</val>
                </item>
                <item>
***************
*** 1213,1218 ****
--- 1845,1868 ----
            </error>
          </p>
  
+         <p>
+           <error id="error-duplicate-variable-names">
+             Error code <errorcode code="duplicateVariableNames"/> <rfc2119>MUST</rfc2119> be
+             thrown if two or more variables or parameters in the same variable set 
+             have the same name.
+           </error>
+         </p>
+ 
+         
+         <p>
+           <error id="error-filter-aspect-model-mismatch">
+             Error code <errorcode code="filterAspectModelMismatch"/><nbsp/><rfc2119>MUST</rfc2119> be
+             thrown if the processing software encounters a variable set in which one or more
+             of the fact variables in the variable set has a filter that can cover an aspect
+             that is not defined in the aspect model of the variable set.
+           </error>
+         </p>
+ 
          <section id="sec-variable-set-relationships">
            <head>Variable-set relationships</head>
  
***************
*** 1236,1242 ****
            <ulist>
              <item>
                have an 
!               <xtermref bibref="XBRL" idref="_Toc156209129">arcrole value</xtermref> 
                equal to <val>http://xbrl.org/arcrole/2008/variable-set</val>
              </item>
              <item>
--- 1886,1892 ----
            <ulist>
              <item>
                have an 
!               <xtermref bibref="XBRL" idref="_3.5.3.9">arcrole value</xtermref> 
                equal to <val>http://xbrl.org/arcrole/2008/variable-set</val>
              </item>
              <item>
***************
*** 1269,1287 ****
              <bibref ref="XBRL"/>. 
            </p>
  
            <p>
-             The value of the <att>name</att> attribute on a 
-             <termref ref="term-variable-arc">
-               variable arc 
-             </termref>
-             is the QName of the variable or parameter 
-             in the variable-set relationship expressed by the arc. 
              When evaluating the variables in a variable-set, XPath variable references
              with this QName are references to the variable or
!             parameter.  Note that this parameter name <rfc2119>MAY</rfc2119>
!             differ from the name given in the 
!             <termref ref="term-parameter">parameter 
!             declaration</termref>.
            </p>
  
            <section id="sec-variable-arc">
--- 1919,1950 ----
              <bibref ref="XBRL"/>. 
            </p>
  
+ 
+           <p>
+             The QName of a variable or parameter is specified by the <att>name</att> 
+             attribute on the <termref ref="term-variable-arc">variable arc</termref> connecting it to a variable
+             set.    
+             If the QName has no namespace prefix, then it has no namespace, regardless of the default namespace for
+             the containing element.  
+             Otherwise, the QName is resolved in accordance with <bibref ref="XMLNAMES"/> 
+             using the namespace declarations that are in scope for the variable arc containing 
+             the <att>name</att> attribute.
+             <footnote>
+               Note that the XML Schema type for the <att>name</att> attribute on variable arcs is
+               not the XML Schema QName data type.  This goes some way toward ensuring that the 
+               QName value of the<att>name</att> attribute  will not be resolved incorrectly
+               by software that is unaware of this specification, based 
+               upon any default namespace declaration in scope for the 
+               containing variable arc.
+             </footnote>
+           </p>
+   
            <p>
              When evaluating the variables in a variable-set, XPath variable references
              with this QName are references to the variable or
!             parameter.  Note that, for parameters, this QName <rfc2119>MAY</rfc2119>
!             differ from the QName given in the 
!             <termref ref="term-parameter">parameter declaration</termref>.
            </p>
  
            <section id="sec-variable-arc">
***************
*** 1325,1331 ****
            <ulist>
              <item>
                have an 
!               <xtermref bibref="XBRL" idref="_Toc156209129">arcrole value</xtermref> 
                equal to <val>http://xbrl.org/arcrole/2008/variable-set-filter</val>
              </item>
              <item>
--- 1988,1994 ----
            <ulist>
              <item>
                have an 
!               <xtermref bibref="XBRL" idref="_3.5.3.9">arcrole value</xtermref> 
                equal to <val>http://xbrl.org/arcrole/2008/variable-set-filter</val>
              </item>
              <item>
***************
*** 1470,1484 ****
              idref="term-non-dimensional-implicit-filters">non-dimensional implicit filters</xtermref>.
            </p>
  
-           <p>
-             <error id="error-missing-implicit-filters">
-               Error code <errorcode code="missingImplicitFilters"/> <rfc2119>MUST</rfc2119> be
-               thrown if the processing software does not know the implicit filtering
-               system to be used for a variable set's aspect model and the
-               <att>implicitFiltering</att> attribute equals <val>true</val>.
-             </error>
-           </p>
- 
          </section><!-- Implicit filtering -->      
  
    
--- 2133,2138 ----
***************
*** 1528,1534 ****
              </xtermref>
              for evaluation of precondition expressions is the 
              <elt>xbrli:xbrl</elt> element of the 
!             <termref ref="term-target-xbrl-instance">target XBRL instance</termref>.
            </p>
            
            <section id="sec-variable-set-precondition-relationships">
--- 2182,2188 ----
              </xtermref>
              for evaluation of precondition expressions is the 
              <elt>xbrli:xbrl</elt> element of the 
!             <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
            </p>
            
            <section id="sec-variable-set-precondition-relationships">
***************
*** 1556,1564 ****
              <ulist>
                <item>
                  have an 
!                 <xtermref bibref="XBRL" idref="_Toc156209129">
!                   arcrole value
!                 </xtermref> 
                  equal to <val>http://xbrl.org/arcrole/2008/variable-set-precondition</val>
                </item>
                <item>
--- 2210,2216 ----
              <ulist>
                <item>
                  have an 
!                 <xtermref bibref="XBRL" idref="_3.5.3.9">arcrole value</xtermref> 
                  equal to <val>http://xbrl.org/arcrole/2008/variable-set-precondition</val>
                </item>
                <item>
***************
*** 1584,1592 ****
              <p>
                Variable-set-precondition relationships <rfc2119>MUST</rfc2119>
                be expressed by 
!               <xtermref bibref="GENERIC" idref="term-generic-arc">
!               generic arcs
!               </xtermref>.
                Violations of this requirement can be 
                detected by validation against the XBRL Specification
                <bibref ref="XBRL"/>. 
--- 2236,2242 ----
              <p>
                Variable-set-precondition relationships <rfc2119>MUST</rfc2119>
                be expressed by 
!               <xtermref bibref="GENERIC" idref="term-generic-arc">generic arcs</xtermref>.
                Violations of this requirement can be 
                detected by validation against the XBRL Specification
                <bibref ref="XBRL"/>. 
***************
*** 1609,1615 ****
            A <term>general variable evaluation</term> is the evaluation of a 
            <termref ref="term-general-variable"> general variable </termref> 
            against a 
!           <termref ref="term-target-xbrl-instance">target XBRL instance</termref>.
          </definition>
        </p>
  
--- 2259,2265 ----
            A <term>general variable evaluation</term> is the evaluation of a 
            <termref ref="term-general-variable"> general variable </termref> 
            against a 
!           <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
          </definition>
        </p>
  
***************
*** 1618,1624 ****
          term="fact variable evaluation">
            A <term>fact variable evaluation</term> is the evaluation of a 
            <termref ref="term-fact-variable"> fact variable</termref> against a 
!           <termref ref="term-target-xbrl-instance">target XBRL instance</termref>.
          </definition>
        </p>
        
--- 2268,2274 ----
          term="fact variable evaluation">
            A <term>fact variable evaluation</term> is the evaluation of a 
            <termref ref="term-fact-variable"> fact variable</termref> against a 
!           <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
          </definition>
        </p>
        
***************
*** 1634,1640 ****
        <p>
          <definition id="term-variable-set-evaluation" 
          term="variable-set evaluation">
!           Except for the following two special cases, a <term>variable-set 
            evaluation</term> is deemed to have occurred
            if all variables in the variable set have been evaluated and
            if all of the preconditions associated with the variable set are 
--- 2284,2290 ----
        <p>
          <definition id="term-variable-set-evaluation" 
          term="variable-set evaluation">
!           Except for the following three special cases, a <term>variable-set 
            evaluation</term> is deemed to have occurred
            if all variables in the variable set have been evaluated and
            if all of the preconditions associated with the variable set are 
***************
*** 1650,1666 ****
        <ulist>
          <item>
            If there are no variables in the variable set, then the variable
!           set is deemed to have been evaluated if the preconditions associated
!           with the variable set are satisfied.
          </item>
          <item>
            If a variable set contains fact variables but all of the fact variables in it 
            evaluate to <termref ref="term-fallback-value">fallback values</termref>, then 
            the variable set is not deemed to have been evaluated.
          </item>
        </ulist>
  
        <p>
          <definition id="term-identical-variable-set-evaluation" term="identical variable-set evaluation">
            Two evaluations of a variable-set for a given input 
            are <term>identical variable-set evaluations</term> 
--- 2300,2344 ----
        <ulist>
          <item>
            If there are no variables in the variable set, then the variable
!           set is deemed to have been evaluated if all preconditions associated
!           with the variable set are satisfied.<footnote>Thus, if there are no variables 
!           in the variable set, and the variable set has no preconditions associated
!           with it, then the variable set can be deemed to have been evaluated.</footnote>
          </item>
          <item>
            If a variable set contains fact variables but all of the fact variables in it 
            evaluate to <termref ref="term-fallback-value">fallback values</termref>, then 
            the variable set is not deemed to have been evaluated.
          </item>
+         <item>
+           No variable set evaluation will have occurred if the variable set contains a fact variable, <val>V</val>, that
+           has evaluated to a <termref ref="term-fallback-value">fallback value</termref> but that fact variable 
+           could have evaluated to a <termref ref="term-non-fallback-value">non-fallback value</termref> without 
+           forcing a change in the value of any one of the other fact variables in the variable 
+           set that has not, itself, evaluated to a fallback value and that does not, itself, have a dependency
+           on fact variable <val>V</val>.
+         </item>
        </ulist>
  
        <p>
+         <error id="error-ambiguousAspects">
+           Error code <errorcode code="ambiguousAspects"/> 
+           <rfc2119>MUST</rfc2119> be thrown if the <termref ref="term-input-xbrl-instance">input XBRL instance</termref> contains a fact
+           for which the aspects cannot be uniquely determined, given the aspect model of 
+           the variable set to be evaluated.
+         </error>
+       </p>
+       
+       <p>
+         <error id="error-ambiguousAspectValues">
+           Error code <errorcode code="ambiguousAspectValues"/> 
+           <rfc2119>MUST</rfc2119> be thrown if the <termref ref="term-input-xbrl-instance">input XBRL instance</termref> contains a fact
+           for which the values of one or more of its aspects cannot be uniquely determined, 
+           given the aspect model of the variable set to be evaluated.
+         </error>
+       </p>
+ 
+       <p>
          <definition id="term-identical-variable-set-evaluation" term="identical variable-set evaluation">
            Two evaluations of a variable-set for a given input 
            are <term>identical variable-set evaluations</term> 
***************
*** 1681,1693 ****
        <p>
          <definition id="term-identical-fact-variable-evaluation" term="identical fact-variable evaluation">
            Two evaluations of a fact variable are <term>identical fact-variable evaluations</term> if:
!           both evaluations are empty sequences; or
!           both evaluations are sequences of nodes and for each node in the sequence for
!           each evaluation, there is an <xtermref bibref="XBRL" idref="_Toc156209172">identical</xtermref> 
!           node in the sequence for the other evaluation.
!           The two evaluations of the fact variable 
!           <rfc2119>MUST</rfc2119> also be sequences of 
!           equal length if they are identical.
          </definition>
        </p>
  
--- 2359,2366 ----
        <p>
          <definition id="term-identical-fact-variable-evaluation" term="identical fact-variable evaluation">
            Two evaluations of a fact variable are <term>identical fact-variable evaluations</term> if:
!           both evaluations are sequences of the same length and for each item in one of the sequences, there
!           is an identical item in the other sequence.
          </definition>
        </p>
  
***************
*** 1781,1794 ****
          <p>
            For a fact variable, if the source sequence is not empty and 
            if it does not bind as a sequence, then the result of its
!           evaluation is any one of the facts in its
            <termref ref="term-source-sequence">source sequence</termref>.
          </p>
  
          <p>
            For a fact variable, if the source sequence is not empty and 
            if it does bind as a sequence, then the result of its
!           evaluation is any sequence of facts that meets the
            following conditions:
          </p>
  
--- 2454,2468 ----
          <p>
            For a fact variable, if the source sequence is not empty and 
            if it does not bind as a sequence, then the result of its
!           evaluation is either its fallback value or any one of the facts in its
            <termref ref="term-source-sequence">source sequence</termref>.
          </p>
  
          <p>
            For a fact variable, if the source sequence is not empty and 
            if it does bind as a sequence, then the result of its
!           evaluation is either its fallback value or 
!           any sequence of facts in the source sequence that meets the
            following conditions:
          </p>
  
***************
*** 1810,1815 ****
--- 2484,2494 ----
              have the same set of aspects.
            </item>
            <item>
+             If the <att>matches</att> attribute on the fact variable is omitted or is equal to <val>false</val>
+             then the evaluation result <rfc2119>MUST NOT</rfc2119> contain any 
+             <termref ref="term-aspect-matched-facts">aspect-matched facts</termref>.
+           </item>
+           <item>
              The evaluation result <rfc2119>MUST</rfc2119> include all 
              possible facts from the source sequence that meet the previous 
              conditions.
***************
*** 1855,1862 ****
            <att>fallbackValue</att> attribute.
            Specifically, the result of the fact variable evaluation is given by 
            evaluating the XPath expression contained by the <att>fallbackValue</att> attribute, 
!           using the <elt>xbrl:xbrli</elt> element of the target XBRL instance as 
!           the context node.
          </p>
  
          <p>
--- 2534,2544 ----
            <att>fallbackValue</att> attribute.
            Specifically, the result of the fact variable evaluation is given by 
            evaluating the XPath expression contained by the <att>fallbackValue</att> attribute, 
!           using the <elt>xbrl:xbrli</elt> element of the <termref ref="term-input-xbrl-instance">input XBRL instance</termref> as 
!           the context node.  The parameters in the variable set are in context for the
!           evaluation of the XPath expression in the <att>fallbackValue</att> attribute
!           but fact and general variables in the variable set are not and so cannot be
!           referenced from within that XPath expression. 
          </p>
  
          <p>
***************
*** 1866,1871 ****
--- 2548,2561 ----
            </definition>
          </p>
  
+         <p>
+           <definition id="term-non-fallback-value" term="non-fallback value">
+             A <term>non-fallback value</term> is the value of a fact variable that has been 
+             determined on the basis of its source sequence rather than the content of the
+             <att>fallbackValue</att> attribute.
+           </definition>
+         </p>
+ 
        </section>
  
      </section>
***************
*** 1902,1907 ****
--- 2592,2598 ----
            <includeChunk ref="boilerplate/references/XLINK.xml"/>
            <includeChunk ref="boilerplate/references/XSLT2.xml"/>
            <includeChunk ref="boilerplate/references/XBRL.xml"/>
+           <includeChunk ref="boilerplate/references/XDM.xml"/>
            <includeChunk ref="boilerplate/references/DIMENSIONS.xml"/>
            <includeChunk ref="boilerplate/references/IMPLICITFILTERS.xml"/>
            <includeChunk ref="boilerplate/references/GENERIC.xml"/>
***************
*** 2225,2231 ****
          <revision ref="person-jim" 
          day="23" month="11" year="2007">
            <p>
!             Reworded definitions for target facts and target XBRL
              instances so that the terminology being defined is the first
              part of the definition.
            </p>
--- 2916,2922 ----
          <revision ref="person-jim" 
          day="23" month="11" year="2007">
            <p>
!             Reworded definitions for input facts and input XBRL
              instances so that the terminology being defined is the first
              part of the definition.
            </p>
***************
*** 2367,2373 ****
              evaluations.  These support extensions such as assertion
              specifications where assertion results depend on a count
              of the different possible variable-set evaluations that are
!             possible with a given target XBRL instance.
            </p>
          </revision>
  
--- 3058,3064 ----
              evaluations.  These support extensions such as assertion
              specifications where assertion results depend on a count
              of the different possible variable-set evaluations that are
!             possible with a given <termref ref="term-input-xbrl-instance">input XBRL instance</termref>.
            </p>
          </revision>
  
***************
*** 2516,2524 ****
              This error was introduced on 29 November 2007.
            </p>
            <p>
!             Bought the names of the XBRL functions used for the segment dimension and 
!             scenario dimension aspect tests into line with the function naming conventions
!             used in the function registry.
            </p>
          </revision>
  
--- 3207,3214 ----
              This error was introduced on 29 November 2007.
            </p>
            <p>
!             Bought the names of the XBRL functions used for the dimension aspect tests 
!             into line with the function naming conventions used in the function registry.
            </p>
          </revision>
  
***************
*** 2620,2625 ****
--- 3310,3605 ----
            </p>
          </revision>
          
+         <revision ref="person-geoff" day="14" month="04" year="2008">
+           <p>
+             Changed <val>xfi:scenario-remainder</val>, <val>xfi:segment-remainder</val>, <val>xfi:facts-scenario-dimension-s-equal2</val>
+             and <val>xfi:facts-segment-dimension-s-equal2</val> function names to 
+             conform with the function registry as suggested by <personref ref="person-muramoto"/>.
+           </p>
+         </revision>        
+ 
+         <revision ref="person-geoff" day="17" month="04" year="2008">
+           <p>
+             Clarified that a variable set with no preconditions and no variables can be deemed to
+             have evaluated once, as suggested by <personref ref="person-herm"/>.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="23" month="04" year="2008">
+           <p>
+             Removed the error code relating to missing implicit filters, 
+             as suggested by <personref ref="person-herm"/>, because it would only
+             be relevant in situations where an aspect model has not been adequately
+             specified.
+           </p>
+           <p>
+             Added error <errorref ref="error-filter-aspect-model-mismatch"/> that prohibits the usage of explicit filters 
+             in a variable set when those explicit filters can cover aspects 
+             that are not defined in the aspect model of the variable set in 
+             question. This was suggested by <personref ref="person-herm"/>.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="12" month="06" year="2008">
+           <p>
+             Added a new error code that is to be thrown whenever two
+             variables or parameters in the same variable set have the
+             same variable name. This is necessary now that evaluation
+             order is determined based upon dependencies that are
+             reflected in variable names.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="17" month="06" year="2008">
+           <p>
+             Refined the definition of identical fact variable
+             evaluations to handle the case where the fact variable
+             evaluation is the fallback value.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="26" month="06" year="2008">
+           <p>
+             Deleted the sentence requiring that filter complements never cover
+             aspects.  Now such filters can cover aspects in the same way that 
+             normal filters can.
+             This issue was raised by <personref ref="person-victor"/>.
+           </p>
+           <p>
+             Clarified that variable names with no namespace prefix are not to be 
+             resolved using the default namespace for the containing element.
+             This issue was raised by <personref ref="person-herm"/>.
+           </p>
+           <p>
+             Changed the evaluation context for fallback values to ensure that
+             fact and general variables are not able to be referenced by the XPath
+             expressions in <att>fallbackValue</att> attributes.  This enables the 
+             specification to remain silent on interactions between fallback values
+             and implicit filtering and relative filtering.
+             This issue was raised by <personref ref="person-andy"/>.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="12" month="08" year="2008">
+           <p>
+             Corrected the definition of identical fact variable evaluations to 
+             handle sequences of atomic values as well as sequences of facts.
+           </p>
+           <p>
+             Modified the definition of variable set evaluations and fact variable evaluations
+             to ensure that application dependent evaluation ordering decisions cannot impact
+             on the set of legal variable set evaluations for a formula and a given target XBRL
+             instance.  This modification was suggested by <personref ref="person-andy"/>.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="13" month="08" year="2008">
+           <p>
+             Removed un-necessary schema limitations on undirected cycles
+             in relationship networks.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="22" month="08" year="2008">
+           <p>
+             Added the <att>nils</att> attribute to fact variables to ensure that fact variables can 
+             determine their own ability to evaluate to nil facts.  This change was motivated by
+             feedback from <personref ref="person-michele"/>.
+           </p>
+           <p>
+             Added the <att>duplicates</att> attribute to fact variables to ensure that fact variables can 
+             determine their own ability to evaluate to sequences that include duplicate facts.  
+             This change was motivated by feedback from <personref ref="person-mark"/>.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="25" month="08" year="2008">
+           <p>
+             Added two new error codes: <errorref ref="error-ambiguousAspects"/> 
+             and <errorref ref="error-ambiguousAspectValues"/>, to cover situations 
+             where the aspect model does not match the information in the XBRL instance
+             well enough to uniquely determine the aspects, and the values of those aspects,
+             for all facts in the instance.
+           </p>
+           <p>
+             Simplified the dimensional aspect model to include only
+             dimension aspects rather than segment dimension aspects and
+             scenario dimension aspects. This simplification is now
+             possible because the base specification WG agreed to require
+             that the one dimension not be reported in both the segment
+             and scenario for a given fact. It is also required because
+             the XDT specification does not always associate a dimension
+             value with a segment or a scenario. This is the case for
+             default dimension values for facts reporting values with
+             dimensions that validate against a conjunction of open
+             hypercubes. Without this simplification the new error codes
+             added today would be thrown for such facts.
+           </p>
+           <p>
+             Moved the definition of an OCC and an OCC aspect to the
+             variable specification from the formula specification so
+             that they can be utilised more generally. Modified the
+             definition of an OCC to be more concrete. Added more
+             explicit requirements on aspect model definitions to ensure
+             that they include one segment OCC aspect and one scenario
+             OCC aspect.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="26" month="09" year="2008">
+           <p>
+             Modified the naming of variables and parameters on variable
+             arcs to ensure that variable and parameter QNames could not
+             be inadvertently changed to incorrect values by processing
+             software that is namespace aware but that does not
+             understand the special treatment of XPath 2.0 variables with
+             no namespace.  Variable and parameter names are now provided 
+             by two attributes, a <att>name</att> name attribute that provides
+             the local name, and, where required, a <att>namespace</att> attribute
+             that provides the namespace.
+           </p>
+           <p>
+             Added a definition of aspect-matched facts to replace the
+             notion of duplicate facts as defined in the XBRL 2.1
+             specification. This also improves terminology support for
+             the consistency assertions specification.
+           </p>
+           <p>
+             Changed the <att>duplicates</att> attribute to a <att>matches</att> attribute
+             to reflect the change from controlling whether variables that can bind as a sequence
+             can allow duplicate facts in a single evaluation sequence to controlling whether variables
+             that can bind as a sequence can allow aspect-matched facts in a single evaluation sequence.  
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="01" month="10" year="2008">
+           <p>
+             Modified the syntax for variable and parameter names once more,
+             reverting to a single attribute that specifies a QName but that uses a
+             restriction on the XML Schema Name type rather than an XML Schema
+             QName type. The specification wording then makes explicit how the
+             value of the name attribute on variable arcs is to be resolved,
+             ensuring that any name attribute value without a QName prefix is
+             resolved to a QName with no namespace. This requires resolution of
+             name attribute values with QName prefixes to be resolved in the usual
+             way, using the namespace declarations that are in scope for the
+             containing variable arc. This approach was universally preferred by
+             the UBMatrix and Fujitsu developers participating in the discussion of
+             variable QName resolution issues.
+           </p>
+           <p>
+             Added a new error code to catch situations where the QName for variables
+             on variable arcs cannot be resolved.
+           </p>
+         </revision>        
+ 
+         <revision ref="person-geoff" day="24" month="10" year="2008">
+           <p>
+             Added <sectionref ref="sec-dimension-aspect-tests"/> to overcome 
+             the inherent limitations of the definition of s-equal2 for 
+             dimension aspect tests.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="29" month="10" year="2008">
+           <p>
+             Corrected typographic errors in <sectionref ref="sec-dimension-aspect-tests"/> as
+             suggested by <personref ref="person-victor"/>.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="04" month="11" year="2008">
+           <p>
+             Corrected function signatures in the implied XPath expressions for dimension aspect tests and removed redundant terms
+             in them, as suggested by <personref ref="person-muramoto"/>.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="06" month="11" year="2008">
+           <p>
+             Renamed the <var>$a</var> and <var>$b</var> variables 
+             used in the definitions of aspect tests 
+             to be in a namespace defined in this specification 
+             to reduce the risk of unintended variable name clashes.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="17" month="11" year="2008">
+           <p>
+             Clarified that <errorref ref="error-variable-name-resolution-failure"/> 
+             is required to be thrown when namespaces cannot be resolved for any attributes
+             that contain fact or general variable QNames.  This involved moving the 
+             explanation of the error code to the XPath usage section.  This change was
+             suggested by <personref ref="person-herm"/> during analysis of conformance 
+             suite coverage.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="27" month="11" year="2008">
+           <p>
+             Added a paragraph to <sectionref ref="sec-xpath-usage"/> to clarify the
+             purpose behind using the <val>variable:QName</val> data type for 
+             attributes that contain XPath variable names.  This was suggested by
+             <personref ref="person-nathan"/>.
+           </p>
+           <p>
+             Added a paragraph to <sectionref ref="sec-xpath-usage"/> to 
+             be specific that the XQuery/XPath data models used for XPath processing
+             are to be constructed from post XML Schema Validation Infosets.  
+             This was a result of feedback from <personref ref="person-nathan"/> on
+             the consequences of not being specific in this way.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="15" month="12" year="2008">
+           <p>
+             Updated references to the latest errata-corrected version of the XBRL 2.1 specification.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="19" month="03" year="2009">
+           <p>
+             Changed the term "target XBRL instance" to "input XBRL instance".
+             Ensured that all usages of the terms input XBRL instance and output
+             XBRL instance reference the term definition.
+           </p>
+           <p>
+             Clarified validity requirements in relation to input XBRL instances.
+           </p>
+           <p>
+             Replaced the s-equal functions with nodes-correspond functions in the aspect test definitions 
+             to ensure that identical nodes could be deemed to match.  Replaced the incorrect 
+             xfi:elements-correspond function with the actual xfi:nodes-correspond function.
+           </p>
+           <p>
+             Allowed formulae to not provide custom function declarations for functions in the XBRL functions
+             registry.  Defined a new error code for custom functions that have the XBRL functions registry namespace.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="23" month="03" year="2009">
+           <p>
+             Fixed the function arguments for the entity identifier aspect test.
+           </p>
+           <p>
+             Clarified the variable set evaluation explanation regarding the implications of 
+             variables that evaluate to fallback values.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="24" month="03" year="2009">
+           <p>
+             Finished a first cut of the sections on static and dynamic
+             context determination.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="26" month="03" year="2009">
+           <p>
+             Specified the default collation as part of the static context initialisation.
+           </p>
+         </revision>
+ 
        </revisions>
  
      </section>
