*** previous/variables.xml	2008-09-28 14:59:49.000000000 +1000
--- current/variables.xml	2008-12-15 11:04:27.000000000 +1100
***************
*** 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>
***************
*** 247,253 ****
          </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
--- 246,290 ----
          </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>
!           As required by <xtermref bibref="XPATH2" idref="id-variables">Section 3.1.2 of the XPath 2.0</xtermref>,
!           the variable name used in an unprefixed variable reference 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 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 meothod for QNames with data 
!           type <val>xs:QName</val>. This is necessary 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 element that
            contains the XPath expression. See Namespaces in XML <bibref ref="XMLNAMES"/>
            for more information on namespace declarations and
***************
*** 255,266 ****
          </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>,
--- 292,297 ----
***************
*** 269,274 ****
--- 300,311 ----
            </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>
        
      </section>
***************
*** 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>
  
--- 367,384 ----
        </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">
--- 395,401 ----
              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>
  
--- 403,409 ----
              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">
--- 419,425 ----
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>(xfi:identifier-scheme($aspectTest:a) eq xfi: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 
--- 427,490 ----
              the fact reports a value for.
            </definition> 
            The aspect test for this aspect is: 
!           <code>xfi:s-equal(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:s-equal(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:s-equal(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:s-equal(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:s-equal(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>
  
--- 495,866 ----
          <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:s-equal(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:elements-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,530 ****
--- 915,976 ----
          </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 dimensional aspect model and the
            non-dimensional aspect model.
          </p>
***************
*** 543,556 ****
              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>
--- 989,1013 ----
              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>
+           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>
--- 1042,1078 ----
                <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>
***************
*** 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>
          
--- 1149,1155 ----
  
          <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>
--- 1193,1199 ----
              <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>
***************
*** 853,860 ****
          </p>
  
          <p>
!           The XPath expression implied by a fact variable begins with:
          </p>
          <p>
            <code>xfi:facts-in-instance()</code>
          </p>
--- 1305,1323 ----
          </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 ****
--- 1327,1333 ----
            <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.
***************
*** 926,934 ****
            </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>
--- 1390,1398 ----
            </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>
--- 1484,1489 ----
***************
*** 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>
--- 1536,1542 ----
              <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 ****
--- 1672,1695 ----
            </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>
--- 1713,1719 ----
            <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">
--- 1746,1777 ----
              <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>
--- 1815,1821 ----
            <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 -->      
  
    
--- 1960,1965 ----
***************
*** 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>
--- 2037,2043 ----
              <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"/>. 
--- 2063,2069 ----
              <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"/>. 
***************
*** 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> 
--- 2127,2171 ----
        <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>
+           If a 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 evaluated to a fallback value and
+           that does not 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 target XBRL instance 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 target XBRL instance 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>
  
--- 2186,2193 ----
        <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>
  
--- 2281,2295 ----
          <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 ****
--- 2311,2321 ----
              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.
***************
*** 1856,1862 ****
            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>
--- 2362,2371 ----
            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.  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 ****
--- 2375,2388 ----
            </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 ****
--- 2419,2425 ----
            <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"/>
***************
*** 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>
  
--- 3034,3041 ----
              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 ****
--- 3137,3389 ----
            </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>
+ 
        </revisions>
  
      </section>
