*** previous/variables.xml	2008-03-12 11:05:52.000000000 +0100
--- current/variables.xml	2008-03-13 13:06:23.000000000 +0100
***************
*** 37,45 ****
          <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,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>
***************
*** 59,78 ****
        <p>
          This specification is an extension to the XBRL Specification
          <bibref ref="XBRL" />. It defines syntax for declaration of
!         two kinds of variables: fact variables that only evaluate to
!         sequences of facts in an XBRL instance and general variables 
          that can evaluate to a broader range of values.  This 
!         specification also defines syntax for parameters that can be
!         given default values or values that are supplied by processing
          software.
        </p>
  
        <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>
--- 58,78 ----
        <p>
          This specification is an extension to the XBRL Specification
          <bibref ref="XBRL" />. It defines syntax for declaration of
!         two kinds of variables: <termref ref="term-fact-variable">fact variables</termref> 
!         that only evaluate to
!         sequences of facts in an XBRL instance and 
!         <termref ref="term-general-variable">general variables</termref> 
          that can evaluate to a broader range of values.  This 
!         specification also defines syntax for 
!         <termref ref="term-parameter">parameters</termref> 
!         that can be given default values or values that are supplied by processing
          software.
        </p>
  
        <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>
***************
*** 94,103 ****
        <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 node.
        </p>
  
        <p>
--- 94,101 ----
        <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>
  
        <p>
***************
*** 112,121 ****
        
        <p>
          The syntax for variables and parameters does not support 
!         specification of names that they can be referenced with in
!         XPath variable references. Instead, names are associated 
!         with variables and parameters by the resources (formulae, 
!         assertions, etc.) that depend on them. This enables variables
          and parameters to be referred to by different names when used
          in different contexts.
        </p>
--- 110,119 ----
        
        <p>
          The syntax for variables and parameters does not support 
!         specification of names that can be used as
!         XPath variable references. Instead, names are 
!         associated with variables and parameters by the relationships to the resources 
!         (formulae, assertions, etc.) that depend on them. This enables variables
          and parameters to be referred to by different names when used
          in different contexts.
        </p>
***************
*** 149,156 ****
          
          <p>
            This design makes it cumbersome to use XPath or XQuery
!           to select data from XBRL instances, at least without 
!           an extensive library of custom functions.
          </p>
  
          <p>
--- 147,155 ----
          
          <p>
            This design makes it cumbersome to use XPath or XQuery
!           to select data from XBRL instances based on their content and their
!           supporting discoverable taxonomy sets, at least without 
!           a library of custom functions.
          </p>
  
          <p>
***************
*** 256,437 ****
          </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 id="sec-custom-function-signature">
!           <head>Custom function signatures</head>
!   
!           <p>
!             <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">
!             A <term>custom function signature</term> is declared by a <elt>variable:function</elt>
!             element.</definition>
!           </p>
  
!           <p>
!             The syntax for the
!             <xmlref ref="xml-custom-function-signature"><elt>variable:function</elt></xmlref>
!             element is defined by the normative schema supplied with this specification.
!           </p>
  
!           <p>
!             Custom functions <rfc2119>MAY</rfc2119> 
!             be used within XPath expressions. 
!           </p>
!   
!           <p>
!             <error id="error-custom-function-without-signature">
!               Error code 
!               <errorcode code="noCustomFunctionSignature"/>
!               <rfc2119>MUST</rfc2119> be thrown 
!               if a custom function is used in an
!               XPath expression but does not have a custom function
!               signature within the discoverable taxonomy set that is 
!               being processed.
!             </error>
!           </p>
!   
!           <p>
!             The <att>name</att> attribute on a custom function signature 
!             contains the QName of the custom function.
!           </p>
!   
!           <p>
!             The value of the <att>output</att> attribute on a custom 
!             function signature specifies the data type of the result 
!             produced by evaluating the custom function.
!           </p>
!           
!           <p>
!             The <elt>variable:input</elt> elements, if any, of a custom function
!             signature specify the data types of the custom function's input
!             parameters.  The value of the <att>type</att> attribute on 
!             <elt>variable:input</elt> elements specifies the data type of the 
!             input parameter.
!           </p>
!   
!           <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>
!   
!         </section>
!   
!         <section id="sec-parameters">
!           <head>Parameters</head>
!   
!           <p>
!             <definition id="term-parameter" term="parameter">
!             A <term>parameter</term> is declared by a <elt>variable:parameter</elt>
!             element.</definition>
!           </p>
!           
!           <p>
!             The syntax for the
!             <xmlref ref="xml-parameter"><elt>variable:parameter</elt></xmlref>
!             element is defined by the normative schema supplied with this specification.
!           </p>
  
!           <p>
!             The <att>name</att> attribute on a parameter 
!             declaration contains the QName of the parameter 
!             being declared.  This is the QName used by the
!             formula processor to uniquely identify the parameter
!             when setting its value.  It is not the QName by which
!             the parameter is referenced when it is used.
!             That QName is specified by relationship of the
!             parameter to the resource that makes use of it.
!           </p>
!             
!           <p>
!             <error id="error-parameter-name-clash">
!               Error code 
!               <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>
!           </p>            
!             
!           <p>
!             If the <att>required</att> attribute on a parameter declaration 
!             is equal to <val>true</val>, then the parameter is mandatory; 
!             its value <rfc2119>MUST</rfc2119> be supplied by 
!             the processing application. 
!           </p>
!     
!           <p>
!             The value of the parameter <rfc2119>MAY</rfc2119> be supplied 
!             by the processing application. If no value is supplied by the 
!             processing application and if the parameter is
!             not mandatory, then the supplied value <rfc2119>MAY</rfc2119> 
!             be computed using the XPath expression given in the 
!             <att>select</att> attribute.
!           </p>
!   
!           <p>
!             A parameter declaration <rfc2119>MAY</rfc2119> 
!             contain an <att>as</att> attribute that
!             specifies the data type required by the parameter.
!           </p>
!           
!           <p>
!             <error id="error-parameter-type-mismatch">
!               Error code 
!               <errorcode code="parameterTypeMismatch"/>
!               <rfc2119>MUST</rfc2119> be thrown if the parameter value,
!               either supplied by the caller or determined from the 
!               <att>select</att> attribute on the parameter, 
!               cannot be converted to the specified data type.
!             </error>
!           </p>
!   
!           <p>
!             <xtermref bibref="XSLT2" idref="dt-sequence-constructor">
!             Sequence constructors
!             </xtermref> 
!             are not available for declaring default parameter values.
!           </p>
            
!         </section>
  
-       </section>
-       
-     </section>
-     
      <section id="sec-syntax">
        <head>Syntax</head>
  
        <includeChunk ref="boilerplate/syntax-explanation.xml"/>
  
        <section id="sec-general-variables">
          <head>General variables</head>
          <p>
            <definition id="term-general-variable" term="general variable">
!           A <term>general variable</term> is declared by a <elt>variable:generalVariable</elt>
!           element.</definition>
          </p>
          
          <p>
--- 255,800 ----
          </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>
  
!     <section id="sec-aspects">
!       <head>Aspects</head>
  
!       <p>
!         XBRL facts are not just values.  They are supported by 
!         a wide range of additional information that provides the 
!         information necessary to interpret the values contained
!         by XBRL facts.
!       </p>
  
!       <p>
!         <definition id="term-aspect" term="aspect">
!           An <term>aspect</term> is defined as one part of the
!           additional information about an XBRL fact.
!         </definition>
!       </p>
! 
!       <p>
!         All aspect definitions <rfc2119>MUST</rfc2119> include the definition
!         of the <termref ref="term-aspect-test">aspect test</termref> to use 
!         when assessing the equivalency of two values
!         for the aspect being defined.
!       </p>
! 
!       <p>
!         <definition id="term-aspect-test" term="aspect test">
!           An <term>aspect test</term> is an XPath expression that defines an 
!           equivalence relation for values of its aspect.
!         </definition>
!       </p>
! 
!       <p>
!         <definition id="term-equivalent-aspect-value" term="equivalent aspect value">
!           Two facts have <term>equivalent values for a given aspect</term> if the 
!           <termref ref="term-aspect-test">aspect test</termref>
!           for that aspect evaluates to true. 
!         </definition>
!       </p>
! 
!       <p>
!         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>
!         <definition id="term-match" term="match">
!           Two values for the one aspect <term>match</term> if the 
!           <termref ref="term-aspect-test">aspect test</termref>
!           for that aspect returns true when evaluated with two variables, 
!           one of which has the first value for the aspect and the other
!           of which has the second value for the aspect.
!         </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>$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>
! 
!       <p>
!         This specification defines the following aspects for all facts, including 
!         tuples:
!       </p>
! 
!       <ulist>
!         <item>
!           <definition id="term-location-aspect" term="location aspect">
!             The <term>location</term> of the fact 
!             is the ordered sequence of elements from the <elt>xbrli:xbrl</elt> element
!             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">
!             The <term>concept aspect</term> is the concept that 
!             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>
! 
!       <p>
!         This specification defines the following aspects for 
!         all items, but not for tuples:
!       </p>
! 
!       <ulist>
!         <item>
!           <definition id="term-entity-identifier-aspect" term="entity identifier aspect">
!             The <term>entity identifier aspect</term> is the identifier of the entity that 
!             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">
!             The <term>period aspect</term> is the period that 
!             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 
!         for numeric items only:
!       </p>
! 
!       <ulist>
!         <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>
! 
!         <p>
!           There are a number of different ways that the additional
!           information about an XBRL fact can be separated into a set
!           of aspects. For example, the entity identification
!           information could be treated as a single aspect or it
!           could be treated as an entity identification scheme aspect
!           and an entity identification value aspect. More
!           significantly, the content of a segment or scenario can be
!           treated as a single aspect or it can be broken down into a
!           potentially large number of aspects.
!         </p>
! 
!         <p>
!           <definition id="term-aspect-model" term="aspect model">
!             An <term>aspect model</term> is a definition of 
!             how the information about a fact will be split into 
!             separate aspects.
!           </definition>
!         </p>
! 
!         <p>
!           <definition id="term-aspect-model-identifier" term="aspect model identifier">
!             An <term>aspect model identifier</term> is a text string that can be used
!             to identify an aspect model.
!           </definition>
!         </p>
! 
!         <p>
!           All aspect model definitions <rfc2119>MUST</rfc2119>
!           specify the aspect model identifier the for the aspect model being defined.
!         </p>
! 
!         <p>
!           All aspect models <rfc2119>MUST</rfc2119> include the following aspects:            
!         </p>
! 
!         <ulist>
!           <item><termref ref="term-location-aspect">location aspect</termref></item>
!           <item><termref ref="term-concept-aspect">concept aspect</termref></item>
!           <item><termref ref="term-entity-identifier-aspect">entity-identifier aspect</termref></item>
!           <item><termref ref="term-period-aspect">period aspect</termref></item>
!           <item><termref ref="term-unit-aspect">unit aspect</termref></item>
!         </ulist>
! 
!         <p>
!           All aspect models <rfc2119>MUST</rfc2119> include sufficient aspects 
!           to ensure that all content in both the contexts and units of facts is 
!           associated with at least one aspect.
!         </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>
! 
!         <table id="table-aspect-models">
!           <caption>Aspect inclusion in aspects models</caption>
!           <thead>
!             <tr>
!               <th>Aspect</th>
!               <th colspan="2">Aspect model</th>
!             </tr>
!             <tr>
!               <th/>
!               <th>Dimensional</th>
!               <th>Non-dimensional</th>
!             </tr>
!           </thead>
!           <tbody>
!             <tr>
!               <td>Location</td>
!               <td>include</td>
!               <td>include</td>
!             </tr>
!             <tr>
!               <td>Concept</td>
!               <td>include</td>
!               <td>include</td>
!             </tr>
!             <tr>
!               <td>Entity identifier</td>
!               <td>include</td>
!               <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>
!           </tbody>
!         </table>
! 
!       </section><!-- Aspect models -->    
            
!     </section><!-- Aspects -->    
  
      <section id="sec-syntax">
        <head>Syntax</head>
  
        <includeChunk ref="boilerplate/syntax-explanation.xml"/>
  
+       <section id="sec-custom-function-signature">
+         <head>Custom function signatures</head>
+ 
+         <p>
+           <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">
+           A <term>custom function signature</term> is declared by a <elt>variable:function</elt>
+           element.</definition>
+         </p>
+ 
+         <p>
+           The syntax for the
+           <xmlref ref="xml-custom-function-signature"><elt>variable:function</elt></xmlref>
+           element is defined by the normative schema supplied with this specification.
+         </p>
+ 
+         <p>
+           Custom functions <rfc2119>MAY</rfc2119> 
+           be used within XPath expressions. 
+         </p>
+ 
+         <p>
+           <error id="error-custom-function-without-signature">
+             Error code 
+             <errorcode code="noCustomFunctionSignature"/>
+             <rfc2119>MUST</rfc2119> be thrown 
+             if a custom function is used in an
+             XPath expression but does not have a custom function
+             signature within the discoverable taxonomy set that is 
+             being processed.
+           </error>
+         </p>
+ 
+         <p>
+           The <att>name</att> attribute on a custom function signature 
+           contains the QName of the custom function.
+         </p>
+ 
+         <p>
+           The value of the <att>output</att> attribute on a custom 
+           function signature specifies the data type of the result 
+           produced by evaluating the custom function.
+         </p>
+         
+         <p>
+           The <elt>variable:input</elt> elements, if any, of a custom function
+           signature specify the data types of the custom function's input
+           parameters.  The value of the <att>type</att> attribute on 
+           <elt>variable:input</elt> elements specifies the data type of the 
+           input parameter.
+         </p>
+ 
+         <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>
+         
+         <p>
+           The implementation of a custom function is outside of the 
+           scope of this specification.
+         </p>
+ 
+       </section>
+ 
+       <section id="sec-parameters">
+         <head>Parameters</head>
+ 
+         <p>
+           <definition id="term-parameter" term="parameter">
+           A <term>parameter</term> is declared by a <elt>variable:parameter</elt>
+           element and can be given default values, specified as part of their declaration,
+           or values that are supplied by processing software.</definition>
+         </p>
+         
+         <p>
+           The syntax for the
+           <xmlref ref="xml-parameter"><elt>variable:parameter</elt></xmlref>
+           element is defined by the normative schema supplied with this specification.
+         </p>
+ 
+         <p>
+           The <att>name</att> attribute on a parameter 
+           declaration contains the QName of the parameter 
+           being declared.  This is the QName used by the
+           variable processor to uniquely identify the parameter
+           when setting its value.  It is not the QName by which
+           the parameter is referenced when it is used.
+           That QName is specified by relationship of the
+           parameter to the resource that makes use of it.
+         </p>
+           
+         <p>
+           <error id="error-parameter-name-clash">
+             Error code 
+             <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>
+         </p>            
+           
+         <p>
+           If the <att>required</att> attribute on a parameter declaration 
+           is equal to <val>true</val>, then the parameter is mandatory; 
+           its value <rfc2119>MUST</rfc2119> be supplied by 
+           the processing application. 
+         </p>
+   
+         <p>
+           Otherwise, the value of the parameter <rfc2119>MAY</rfc2119> be supplied 
+           by the processing application. If no value is supplied by the 
+           processing application and if the parameter is
+           not mandatory, then the supplied value <rfc2119>MAY</rfc2119> 
+           be computed using the XPath expression given in the 
+           <att>select</att> attribute.
+         </p>
+ 
+         <p>
+           A parameter declaration <rfc2119>MAY</rfc2119> 
+           contain an <att>as</att> attribute that
+           specifies the data type required by the parameter.
+         </p>
+         
+         <p>
+           <error id="error-parameter-type-mismatch">
+             Error code <errorcode code="parameterTypeMismatch"/>
+             <rfc2119>MUST</rfc2119> be thrown if the parameter value,
+             either supplied by the caller or determined from the 
+             <att>select</att> attribute on the parameter, 
+             cannot be converted to the specified data type.
+           </error>
+         </p>
+ 
+         <p>
+           Unlike parameters in the XSLT 2.0 specification <bibref ref="XSLT2"/>, the parameters
+           defined in this specification cannot contain
+           <xtermref bibref="XSLT2" idref="dt-sequence-constructor">sequence 
+           constructors</xtermref>.
+         </p>
+         
+       </section>
+ 
        <section id="sec-general-variables">
          <head>General variables</head>
          <p>
            <definition id="term-general-variable" term="general variable">
!             A <term>general variable</term> is declared by a <elt>variable:generalVariable</elt>
!             element.
!           </definition>
          </p>
          
          <p>
***************
*** 461,468 ****
  
          <p>
            <definition id="term-fact-variable" term="fact variable">
!           A <term>fact variable</term> is declared by a <elt>variable:factVariable</elt>
!           element.</definition>
          </p>
  
          <p>
--- 824,832 ----
  
          <p>
            <definition id="term-fact-variable" term="fact variable">
!             A <term>fact variable</term> is declared by a <elt>variable:factVariable</elt>
!             element.
!           </definition>
          </p>
  
          <p>
***************
*** 478,486 ****
          </p>
  
          <p>
!           The <att>bindEmpty</att> attribute and the optional <att>fallbackValue</att>
!           attribute on fact variables also have implications for their evaluation, 
!           as set out in 
            <sectionref ref="sec-binding-to-empty-sequence"/>.
          </p>
  
--- 842,849 ----
          </p>
  
          <p>
!           The optional <att>fallbackValue</att> attribute on fact variables 
!           also has implications for their evaluation, as set out in 
            <sectionref ref="sec-binding-to-empty-sequence"/>.
          </p>
  
***************
*** 498,506 ****
  
          <p>
            This term is followed by an 
!           <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.
            The expression in the XPath predicate includes an 
--- 861,868 ----
  
          <p>
            This term is followed by an 
!           <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.
            The expression in the XPath predicate includes an 
***************
*** 518,526 ****
  
          <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>
  
--- 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>
  
***************
*** 543,551 ****
            the XPath expressions implied by the filters and the filter 
            complements are combined using the  
            <code>and</code> token to form a single 
!           <xtermref bibref="XPATH2" idref="doc-xpath-AndExpr"> 
!           XPath and-expression
!           </xtermref>.
          </p>
  
          <section id="sec-filters">
--- 903,910 ----
            the XPath expressions implied by the filters and the filter 
            complements are combined using the  
            <code>and</code> token to form a single 
!           <xtermref bibref="XPATH2" idref="doc-xpath-AndExpr">XPath 
!           and-expression</xtermref>.
          </p>
  
          <section id="sec-filters">
***************
*** 561,569 ****
            <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>
  
--- 920,927 ----
            <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>
  
***************
*** 586,592 ****
            <p>
              All filters <rfc2119>MUST</rfc2119> imply an XPath 
              expression that can be evaluated using any fact as a 
!             context node.
            </p>
            
            <p>
--- 944,950 ----
            <p>
              All filters <rfc2119>MUST</rfc2119> imply an XPath 
              expression that can be evaluated using any fact as a 
!             context item.
            </p>
            
            <p>
***************
*** 597,606 ****
  
            <p>
              The XPath expression implied by a filter <rfc2119>MAY</rfc2119>
!             include 
!             <xtermref bibref="XPATH2" idref="dt-variable-reference">
!             XPath variable references
!             </xtermref>. 
              Resolution of XPath variable references in the XPath expressions
              implied by filters is beyond the scope of this specification.  
              Resolution of such XPath variable references needs to be addressed
--- 955,962 ----
  
            <p>
              The XPath expression implied by a filter <rfc2119>MAY</rfc2119>
!             include <xtermref bibref="XPATH2" idref="dt-variable-reference">XPath 
!             variable references</xtermref>. 
              Resolution of XPath variable references in the XPath expressions
              implied by filters is beyond the scope of this specification.  
              Resolution of such XPath variable references needs to be addressed
***************
*** 613,619 ****
              A fact meets the criteria specified by a
              filter only if the result of evaluating the 
              XPath expression implied by that filter,
!             using the fact as the context node,
              results in an 
              <xtermref bibref="XPATH2" idref="dt-ebv">
              effective Boolean value</xtermref>
--- 969,975 ----
              A fact meets the criteria specified by a
              filter only if the result of evaluating the 
              XPath expression implied by that filter,
!             using the fact as the context item,
              results in an 
              <xtermref bibref="XPATH2" idref="dt-ebv">
              effective Boolean value</xtermref>
***************
*** 621,627 ****
            </p>
  
            <p>
!             Every explicit filter specification 
              <rfc2119>MUST</rfc2119> indicate the
              <termref ref="term-aspect">aspects</termref>, if any, that it can
              <termref ref="term-covers-an-aspect">cover</termref>.
--- 977,998 ----
            </p>
  
            <p>
!             <definition id="term-covers-an-aspect" term="covers an aspect">
!               A filter can <term>cover an aspect</term> if it selects facts 
!               using that aspect as a selection criterion.
!             </definition>
!           </p>
!     
!           <p>
!             <definition id="term-uncovered-aspect" term="uncovered aspect">
!               An <term>uncovered aspect</term> of a fact variable is an aspect that is 
!               not covered by any of the filters that are being used to construct
!               the XPath expression implied by the variable.
!             </definition>
!           </p>
! 
!           <p>
!             Every filter specification 
              <rfc2119>MUST</rfc2119> indicate the
              <termref ref="term-aspect">aspects</termref>, if any, that it can
              <termref ref="term-covers-an-aspect">cover</termref>.
***************
*** 690,707 ****
              <p>
                <definition id="term-variable-filter-relationship" 
                term="variable-filter relationship">
!                 A 
!                 <term>variable-filter relationship</term> 
                  is a relationship between an 
!                 <termref ref="term-fact-variable">
!                   fact variable
!                 </termref> 
!                 and a 
!               <termref ref="term-filter">
!                   filter
!                 </termref> 
!                 expressed by an
!                 <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
                </definition>
              </p>
            
--- 1061,1071 ----
              <p>
                <definition id="term-variable-filter-relationship" 
                term="variable-filter relationship">
!                 A <term>variable-filter relationship</term> 
                  is a relationship between an 
!                 <termref ref="term-fact-variable">fact variable</termref> 
!                 and a <termref ref="term-filter">filter</termref> 
!                 expressed by an <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
                </definition>
              </p>
            
***************
*** 713,734 ****
              <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>
                  have a fact variable at the 
!                 <xtermref bibref="XLINK" idref="dt-starting-resource">
!                   starting resource of the arc
!                 </xtermref>
                </item>
                <item>
                  have a filter at the 
!                 <xtermref bibref="XLINK" idref="dt-ending-resource">
!                   ending resource of the arc
!                 </xtermref>
                </item>
              </ulist>
  
--- 1077,1092 ----
              <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>
                  have a fact variable at the 
!                 <xtermref bibref="XLINK" idref="dt-starting-resource">starting resource of the arc</xtermref>
                </item>
                <item>
                  have a filter at the 
!                 <xtermref bibref="XLINK" idref="dt-ending-resource">ending resource of the arc</xtermref>
                </item>
              </ulist>
  
***************
*** 741,940 ****
              <p>
                Variable-filter relationships <rfc2119>MUST</rfc2119>
                be expressed by 
!               <termref ref="term-variable-filter-arc">
!               variable-filter arcs
!               </termref>.
                Violations of this requirement can be 
!               detected by validation against the XBRL Specification
!               <bibref ref="XBRL"/>. 
!             </p>
!             
!             <p>
!               <definition id="term-complemented-variable-filter-relationship" term="complemented variable-filter relationship">
!                 A <term>complemented variable-filter relationship</term> is a variable-filter relationship
!                 that is expressed by an arc with a <att>complement</att> attribute that has a value of <val>true</val>.
!               </definition>
!             </p>
! 
!             <p>
!               A fact variable with a complemented variable-filter relationship to a filter
!               uses the 
!               <termref ref="term-filter-complement">
!               filter complement
!               </termref> 
!               in its implied XPath expression rather than the filter itself.
!             </p>
! 
!             <p>
!               <definition id="term-covering-variable-filter-relationship" term="covering variable-filter relationship">
!                 A <term>covering variable-filter relationship</term> is a variable-filter relationship
!                 that is expressed by an arc with a <att>cover</att> attribute that has a value of <val>true</val>.
!               </definition>
!             </p>
! 
!             <p>
!                 If a filter is related to a variable by a variable-filter relationship, that
!                 filter only covers aspects of the facts being filtered if the variable-filter
!                 relationship is 
!                 <termref ref="term-covering-variable-filter-relationship">
!                 covering
!                 </termref>. 
!             </p>
!             
!             <section id="sec-variable-filter-arc">
!               <head>Variable-filter arcs</head>
!             
!               <p>
!                 <definition id="term-variable-filter-arc" term="variable-filter arc">
!                 A <term>variable-filter arc</term> is expressed by the <elt>variable:variableFilterArc</elt>
!                 element.</definition>
!               </p>
! 
!               <p>
!                 The syntax for the
!                 <xmlref ref="xml-variable-filter-arc"><elt>variable:variableFilterArc</elt></xmlref>
!                 element is defined by the normative schema supplied with this specification.
!               </p>
! 
!             </section><!-- Variable-filter arcs -->
!             
!           </section><!-- Variable-filter relationships -->
! 
!           <section id="sec-variable-set-filter-relationships">
!             <head>Variable-set-filter relationships</head>
!             
!             <p>
!               <definition id="term-variable-set-filter-relationship" 
!               term="variable-set-filter relationship">
!                 A 
!                 <term>variable-set-filter relationship</term> 
!                 is a relationship between a 
!                 <termref ref="term-variable-set-resource">
!                   variable set resource
!                 </termref> 
!                 and a 
!               <termref ref="term-filter">
!                   filter
!                 </termref> 
!                 expressed by an
!                 <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
!               </definition>
!             </p>
!           
!             <p>
!               To declare a variable-set-filter relationship an
!               XLink arc <rfc2119>MUST</rfc2119>:
!             </p>
!             
!             <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>
!                 have an XLink resource that defines a 
!                 <termref ref="term-variable-set">variable set</termref>
!                 at the 
!                 <xtermref bibref="XLINK" idref="dt-starting-resource">
!                   starting resource of the arc
!                 </xtermref>
!               </item>
!               <item>
!                 have a filter at the 
!                 <xtermref bibref="XLINK" idref="dt-ending-resource">
!                   ending resource of the arc
!                 </xtermref>
!               </item>
!             </ulist>
!   
!             <p>
!               The arcrole value, 
!               <xmlref ref="variable-filter"><val>http://xbrl.org/arcrole/2008/variable-set-filter</val></xmlref>,
!               is declared in the normative schema supplied with this specification.
!             </p>
! 
!             <p>
!               Variable-set-filter relationships <rfc2119>MUST</rfc2119>
!               be expressed by 
!               <termref ref="term-variable-set-filter-arc">
!               variable-set filter arcs
!               </termref>.
!               Violations of this requirement can be 
!               detected by validation against the XBRL Specification
!               <bibref ref="XBRL"/>. 
!             </p>
! 
!             <p>
!               A filter participating in a variable-set-filter relationship is,
!               by definition, associated with each of the fact variables in variable
!               set defined by the resource that it is related to.
!             </p>
!             
!             <p>
!               <definition id="term-group-filter" term="group-filter">
!                 A filter that is associated with a fact variable by a variable-set-filter relationship is
!                 referred to as a <term>group filter</term>.
!               </definition>
              </p>
              
              <p>
!               <definition id="term-complemented-variable-set-filter-relationship" term="complemented variable-set-filter relationship">
!                 A <term>complemented variable-set-filter relationship</term> is a variable-set-filter relationship
                  that is expressed by an arc with a <att>complement</att> attribute that has a value of <val>true</val>.
                </definition>
              </p>
  
              <p>
!               The fact variables in a variable set defined by a resource with a complemented 
!               variable-set-filter relationship to a filter use the 
!               <termref ref="term-filter-complement">
!               filter complement
!               </termref> 
!               in their implied XPath expressions rather than the filter itself.
!             </p>
! 
!             <p>
!               All filters that are associated with fact variables 
!               by variable-set-filter relationships, by definition,
!               do not cover any aspects.
              </p>
  
              <p>
!               Filters that are associated with fact variables by variable-set-filter relationships 
!               <rfc2119>MUST NOT</rfc2119> imply XPath expressions that include XPath variable references
!               to general variables or fact variables.
              </p>
  
              <p>
!               <error id="error-fact-variable-reference-not-allowed">
!                 Error code <errorcode code="factVariableReferenceNotAllowed"/> <rfc2119>MUST</rfc2119> be thrown
!                 if a filter that is associated with fact variables by a variable-set-filter relationship 
!                 implies an XPath expression that includes an XPath variable reference to a general variable
!                 or a fact variable.
!               </error>
              </p>
              
!             <section id="sec-variable-set-filter-arc">
!               <head>Variable-set filter arcs</head>
              
                <p>
!                 <definition id="term-variable-set-filter-arc" term="variable-set filter arc">
!                 A <term>variable-set filter arc</term> is expressed by the <elt>variable:variableSetFilterArc</elt>
!                 element.</definition>
                </p>
  
                <p>
                  The syntax for the
!                 <xmlref ref="xml-variable-set-filter-arc"><elt>variable:variableSetFilterArc</elt></xmlref>
                  element is defined by the normative schema supplied with this specification.
                </p>
  
!             </section><!-- Filter arcs -->
! 
!           </section> <!-- variable-set-filter relationships -->
  
          </section><!--  Filters -->
  
--- 1099,1156 ----
              <p>
                Variable-filter relationships <rfc2119>MUST</rfc2119>
                be expressed by 
!               <termref ref="term-variable-filter-arc">variable-filter arcs</termref>.
                Violations of this requirement can be 
!               detected by validation against the XBRL Specification
!               <bibref ref="XBRL"/>. 
              </p>
              
              <p>
!               <definition id="term-complemented-variable-filter-relationship" term="complemented variable-filter relationship">
!                 A <term>complemented variable-filter relationship</term> is a variable-filter relationship
                  that is expressed by an arc with a <att>complement</att> attribute that has a value of <val>true</val>.
                </definition>
              </p>
  
              <p>
!               A fact variable with a complemented variable-filter relationship to a filter
!               uses the 
!               <termref ref="term-filter-complement">filter complement</termref> 
!               in its implied XPath expression rather than the filter itself.
              </p>
  
              <p>
!               <definition id="term-covering-variable-filter-relationship" term="covering variable-filter relationship">
!                 A <term>covering variable-filter relationship</term> is a variable-filter relationship
!                 that is expressed by an arc with a <att>cover</att> attribute that has a value of <val>true</val>.
!               </definition>
              </p>
  
              <p>
!                 If a filter is related to a variable by a variable-filter relationship, that
!                 filter only covers aspects of the facts being filtered if the variable-filter
!                 relationship is <termref ref="term-covering-variable-filter-relationship">covering</termref>. 
              </p>
              
!             <section id="sec-variable-filter-arc">
!               <head>Variable-filter arcs</head>
              
                <p>
!                 <definition id="term-variable-filter-arc" term="variable-filter arc">
!                   A <term>variable-filter arc</term> is expressed by 
!                   the <elt>variable:variableFilterArc</elt> element.
!                 </definition>
                </p>
  
                <p>
                  The syntax for the
!                 <xmlref ref="xml-variable-filter-arc"><elt>variable:variableFilterArc</elt></xmlref>
                  element is defined by the normative schema supplied with this specification.
                </p>
  
!             </section><!-- Variable-filter arcs -->
!             
!           </section><!-- Variable-filter relationships -->
  
          </section><!--  Filters -->
  
***************
*** 945,953 ****
  
          <p>
            The XPath expressions implied by variables can include
!           <xtermref bibref="XPATH2" idref="id-variables">
!           XPath variable references
!           </xtermref>
            that need to be resolved to other fact or general variables.
            This reference can only be resolved if the variable implying 
            the XPath expression and the variable being referenced are
--- 1161,1167 ----
  
          <p>
            The XPath expressions implied by variables can include
!           <xtermref bibref="XPATH2" idref="id-variables">XPath variable references</xtermref>
            that need to be resolved to other fact or general variables.
            This reference can only be resolved if the variable implying 
            the XPath expression and the variable being referenced are
***************
*** 975,1002 ****
            to a variable-set resource are in the variable set defined by that resource.
          </p>
  
          <section id="sec-variable-set-relationships">
            <head>Variable-set relationships</head>
  
            <p>
!             <definition id="term-variable-set-relationship" 
!             term="variable-set relationship">
!               A 
!               <term>variable-set relationship</term> 
!               is a relationship between a 
                <termref ref="term-variable-set">variable-set resource</termref> 
                and either a 
!             <termref ref="term-fact-variable">
!                 fact variable
!               </termref> or a 
!             <termref ref="term-general-variable">
!                 general variable
!               </termref>, or a 
!             <termref ref="term-parameter">
!                 parameter
!               </termref> 
!               expressed by an
!               <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
              </definition>
            </p>
  
--- 1189,1230 ----
            to a variable-set resource are in the variable set defined by that resource.
          </p>
  
+         <p>
+           Variable sets identify their <termref ref="term-aspect-model">aspect model</termref>
+           using their <att>aspectModel</att> attribute. The value of the <att>aspectModel</att> 
+           attribute on a variable-set resource is the <termref ref="term-aspect-model-identifier">aspect 
+           model identifier</termref> of the aspect model to be used when evaluating variables in 
+           the variable set defined by the variable-set resource.
+         </p>
+ 
+         <p>
+           <definition id="term-variable-sets-aspect-model" term="variable set's aspect model ">
+             A <term>variable set's aspect model</term> is the aspect model identified by
+             the <att>aspectModel</att> attribute on the variable-set resource defining the 
+             variable set.
+           </definition>
+         </p>
+         
+         <p>
+           <error id="error-unknown-aspect-model">
+             Error code <errorcode code="unknownAspectModel"/> <rfc2119>MUST</rfc2119> be
+             thrown if the processing software does not recognise the aspect model 
+             identified by the value of an <att>aspectModel</att> attribute.
+           </error>
+         </p>
+ 
          <section id="sec-variable-set-relationships">
            <head>Variable-set relationships</head>
  
            <p>
!             <definition id="term-variable-set-relationship" term="variable-set relationship">
!               A <term>variable-set relationship</term> is a relationship between a 
                <termref ref="term-variable-set">variable-set resource</termref> 
                and either a 
!             <termref ref="term-fact-variable">fact variable</termref> or a 
!             <termref ref="term-general-variable">general variable</termref>, or a 
!             <termref ref="term-parameter">parameter</termref> expressed by an
!             <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
              </definition>
            </p>
  
***************
*** 1008,1030 ****
            <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>
                have a variable-set resource at the 
!               <xtermref bibref="XLINK" idref="dt-starting-resource">
!                 starting resource of the arc
!               </xtermref>
              </item>
              <item>
                have a parameter or a fact variable  
                or a general variable at the 
!               <xtermref bibref="XLINK" idref="dt-ending-resource">
!                 ending resource of the arc
!               </xtermref>
              </item>
            </ulist>
  
--- 1236,1254 ----
            <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>
                have a variable-set resource at the 
!               <xtermref bibref="XLINK" idref="dt-starting-resource">starting 
!               resource of the arc</xtermref>
              </item>
              <item>
                have a parameter or a fact variable  
                or a general variable at the 
!               <xtermref bibref="XLINK" idref="dt-ending-resource">ending 
!               resource of the arc</xtermref>
              </item>
            </ulist>
  
***************
*** 1039,1047 ****
            <p>
              Variable-set relationships <rfc2119>MUST</rfc2119>
              be expressed by 
!             <termref ref="term-variable-arc">
!             variable arcs
!             </termref>.
              Violations of this requirement can be 
              detected by validation against the XBRL Specification
              <bibref ref="XBRL"/>. 
--- 1263,1269 ----
            <p>
              Variable-set relationships <rfc2119>MUST</rfc2119>
              be expressed by 
!             <termref ref="term-variable-arc">variable arcs</termref>.
              Violations of this requirement can be 
              detected by validation against the XBRL Specification
              <bibref ref="XBRL"/>. 
***************
*** 1081,1463 ****
            
          </section><!-- Variable-set relationships -->
  
!         <section id="sec-aspects">
!           <head>Aspects</head>
! 
            <p>
!             XBRL facts are not just values.  They are supported by 
!             a wide range of additional information that provides the 
!             information necessary to interpret the values contained
!             by XBRL facts.
            </p>
! 
            <p>
!             <definition id="term-aspect" term="aspect">
!               An <term>aspect</term> is defined as one part of the
!               additional information about an XBRL fact.
!             </definition>
            </p>
  
            <p>
!             <definition id="term-covers-an-aspect" term="covers an aspect">
!               A filter can <term>cover an aspect</term> if it selects facts 
!               using that aspect as a selection criterion.
!             </definition>
            </p>
  
            <p>
!             <definition id="term-uncovered-aspect" term="uncovered aspect">
!               An <term>uncovered aspect</term> of a fact variable is an aspect that is 
!               not covered by any of the filters that are being used to construct
!               the XPath expression implied by the variable.
!             </definition>
            </p>
  
            <p>
!             <definition id="term-equivalent-aspect-value" term="equivalent aspect value">
!               Two facts have <term>equivalent values for a given aspect</term> if the 
!               <termref ref="term-aspect-test">aspect test</termref>
!               for that aspect evaluates to true.
!             </definition>
            </p>
! 
            <p>
!             <definition id="term-aspect-test" term="aspect test">
!               For two facts, an <term>aspect test</term> is an XPath expression 
!               that can be used to test whether the aspect being tested is not
!               reported for both facts or is reported with an equivalent value
!               for both facts.
              </definition>
-             The context item when evaluating all aspect tests is the 
-             <elt>xbrli:xbrl</elt> element of the target XBRL instance.
            </p>
! 
            <p>
!             All aspect definitions <rfc2119>MUST</rfc2119> include the definition
!             of the aspect test to use when assessing the equivalency of two values
!             for the aspect being defined.
!             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>
  
            <p>
!             <definition id="term-match" term="match">
!               Two values for the one aspect <term>match</term> if the 
!               <termref ref="term-aspect-test">aspect test</termref>
!               for that aspect returns true when evaluated with two variables, 
!               one of which has the first value for the aspect and the other
!               of which has the second value for the aspect.
!             </definition>
            </p>
  
            <p>
!             This specification defines the following aspects for all facts, including 
!             tuples:
            </p>
  
-           <ulist>
-             <item>
-               <definition id="term-location-aspect" term="location aspect">
-                 The <term>location</term> of the fact 
-                 is the ordered sequence of elements from the <elt>xbrli:xbrl</elt> element
-                 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">
-                 The <term>concept aspect</term> is the concept that 
-                 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>
- 
            <p>
!             This specification defines the following aspects for 
!             all items, but not for tuples:
            </p>
  
-           <ulist>
-             <item>
-               <definition id="term-entity-identifier-aspect" term="entity identifier aspect">
-                 The <term>entity identifier aspect</term> is the identifier of the entity that 
-                 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">
-                 The <term>period aspect</term> is the period that 
-                 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:fact-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:fact-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 
!             for numeric items only:
            </p>
! 
!           <ulist>
!             <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)) or
!               </code>
!             </item>
!           </ulist>
! 
!           <section id="sec-aspect-model">
!             <head>Aspect models</head>
! 
!             <p>
!               There are a number of different ways that the additional
!               information about an XBRL fact can be separated into a set
!               of aspects. For example, the entity identification
!               information could be treated as a single aspect or it
!               could be treated as an entity identification scheme aspect
!               and an entity identification value aspect. More
!               significantly, the content of a segment or scenario can be
!               treated as a single aspect or it can be broken down into a
!               potentially large number of aspects.
!             </p>
!   
!             <p>
!               <definition id="term-aspect-model" term="aspect model">
!                 An <term>aspect model</term> is a definition of 
!                 how the information about a fact will be split into 
!                 separate aspects.
!               </definition>
!             </p>
! 
              <p>
!               This specification defines two aspect models.
!               Specifications that define new aspect models will need to specify new values 
!               for the <att>aspectModel</att> attribute to identify the new aspect models.
              </p>
  
              <p>
!               All aspect models <rfc2119>MUST</rfc2119> include the following aspects:            
              </p>
  
!             <ulist>
!               <item><termref ref="term-location-aspect">location aspect</termref></item>
!               <item><termref ref="term-concept-aspect">concept aspect</termref></item>
!               <item><termref ref="term-entity-identifier-aspect">entity-identifier aspect</termref></item>
!               <item><termref ref="term-period-aspect">period aspect</termref></item>
!               <item><termref ref="term-unit-aspect">unit aspect</termref></item>
!             </ulist>
! 
!             <p>
!               All aspect models <rfc2119>MUST</rfc2119> also include sufficient additional aspects 
!               to ensure that any content in context segments and scenarios is also associated with 
!               an aspect.
!             </p>
  
!             <p>
!               The value of the <att>aspectModel</att> attribute on a
!               Variable-set resource specifies the aspect model to be
!               used when evaluating variables in the variable set defined
!               by the variable-set resource.
!               <definition id="term-variable-sets-aspect-model" term="variable set's aspect model ">
!                 A <term>variable set's aspect model</term> is the aspect model identified by
!                 the <att>aspectModel</att> attribute on the variable-set resource defining the 
!                 variable set.
!               </definition>
!             </p>
    
!             <p>
!               <definition id="term-dimensional-aspect-model" term="dimensional aspect model">
!                 The variable set of a variable-set resource with an <att>aspectModel</att> 
!                 attribute equal to <val>dimensional</val> has a <term>dimensional aspect model</term>.
!               </definition>
!               The dimensional aspect model 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>.              
!             </p>
! 
!             <p>
!               <definition id="term-non-dimensional-aspect-model" term="non-dimensional aspect model">
!                 The variable set of a variable-set resource with an <att>aspectModel</att> 
!                 attribute equal to <val>non-dimensional</val> has a <term>non-dimensional aspect model</term>.
!               </definition>
!               The non-dimensional aspect model 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>.
!             </p>
! 
!             <p>
!               <error id="error-unknown-aspect-model">
!                 Error code <errorcode code="unknownAspectModel"/> <rfc2119>MUST</rfc2119> be
!                 thrown if the processing software does not recognise the aspect model 
!                 identified by the value of the <att>aspectModel</att> attribute.
!               </error>
!             </p>
  
!           </section><!-- Aspect models -->
!         
!           <section id="sec-implicit-filters">
!             <head>Implicit filters</head>
!     
!             <p>
!               Fact variables in a variable set <rfc2119>MAY</rfc2119> be associated with 
!               <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>
!               as well as filters that are related to them explicitly by 
!               <termref ref="term-variable-filter-relationship">variable-filter relationships</termref> and
!               <termref ref="term-variable-set-filter-relationship">variable-set-filter relationships</termref>.
!             </p>
  
!             <p>
!               A variable set <rfc2119>MUST</rfc2119> have an <att>implicitFiltering</att> attribute that is
!               equal to <val>true</val> if its fact variables are to have 
!               <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>.  
!               If the <att>implicitFiltering</att> attribute is equal to <val>false</val> then 
!               the fact variables in the variable set are not associated with implicit filters.
!             </p>
!             
!             <p>
!               <definition id="term-uses-implicit-filtering" term="uses implicit filtering">
!                 A variable set <term>uses implicit filtering</term> if its 
!                 <att>implicitFiltering</att> attribute equals <val>true</val>
!                 and it does not use implicit filtering if the 
!                 <att>implicitFiltering</att> attribute equals <val>false</val>.
!               </definition>
!             </p>
  
!             <p>
!               The implicit filters, if any, that are associated with the fact variables
!               in a variable set depend on the variable set's aspect model.
!             </p>
!             
!             <p>
!               If a variable set has a dimensional aspect model, then the 
!               fact variable in the variable set are associated with
!               <xtermref bibref="IMPLICITFILTERS" 
!               idref="term-dimensional-implicit-filters">dimensional implicit filters</xtermref>.
!             </p>
  
!             <p>
!               If a variable set has a non-dimensional aspect model, then the 
!               fact variable in the variable set are associated with
!               <xtermref bibref="IMPLICITFILTERS" 
!               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 -->      
-           
-         </section><!-- Aspects -->
    
          <section id="sec-preconditions">
            <head>Preconditions</head>
--- 1303,1486 ----
            
          </section><!-- Variable-set relationships -->
  
!         <section id="sec-variable-set-filter-relationships">
!           <head>Variable-set-filter relationships</head>
!           
            <p>
!             <definition id="term-variable-set-filter-relationship" 
!             term="variable-set-filter relationship">
!               A <term>variable-set-filter relationship</term> 
!               is a relationship between a 
!               <termref ref="term-variable-set-resource">variable set resource</termref> and a 
!               <termref ref="term-filter">filter</termref> 
!               expressed by an <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
!             </definition>
            </p>
!         
            <p>
!             To declare a variable-set-filter relationship an
!             XLink arc <rfc2119>MUST</rfc2119>:
            </p>
+           
+           <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>
+               have an XLink resource that defines a 
+               <termref ref="term-variable-set">variable set</termref>
+               at the 
+               <xtermref bibref="XLINK" idref="dt-starting-resource">starting resource of the arc</xtermref>
+             </item>
+             <item>
+               have a filter at the 
+               <xtermref bibref="XLINK" idref="dt-ending-resource">ending resource of the arc</xtermref>
+             </item>
+           </ulist>
  
            <p>
!             The arcrole value, 
!             <xmlref ref="variable-filter"><val>http://xbrl.org/arcrole/2008/variable-set-filter</val></xmlref>,
!             is declared in the normative schema supplied with this specification.
            </p>
  
            <p>
!             Variable-set-filter relationships <rfc2119>MUST</rfc2119>
!             be expressed by 
!             <termref ref="term-variable-set-filter-arc">variable-set filter arcs</termref>.
!             Violations of this requirement can be 
!             detected by validation against the XBRL Specification
!             <bibref ref="XBRL"/>. 
            </p>
  
            <p>
!             A filter participating in a variable-set-filter relationship is,
!             by definition, associated with each of the fact variables in variable
!             set defined by the resource that it is related to.
            </p>
!           
            <p>
!             <definition id="term-group-filter" term="group-filter">
!               A filter that is associated with a fact variable by a variable-set-filter relationship is
!               referred to as a <term>group filter</term>.
              </definition>
            </p>
!           
            <p>
!             <definition id="term-complemented-variable-set-filter-relationship" term="complemented variable-set-filter relationship">
!               A <term>complemented variable-set-filter relationship</term> is a variable-set-filter relationship
!               that is expressed by an arc with a <att>complement</att> attribute that has a value of <val>true</val>.
!             </definition>
            </p>
  
            <p>
!             The fact variables in a variable set defined by a resource with a complemented 
!             variable-set-filter relationship to a filter use the 
!             <termref ref="term-filter-complement">filter complement</termref> 
!             in their implied XPath expressions rather than the filter itself.
            </p>
  
            <p>
!             All filters that are associated with fact variables 
!             by variable-set-filter relationships, by definition,
!             do not cover any aspects.
            </p>
  
            <p>
!             Filters that are associated with fact variables by variable-set-filter relationships 
!             <rfc2119>MUST NOT</rfc2119> imply XPath expressions that include XPath variable references
!             to general variables or fact variables.
            </p>
  
            <p>
!             <error id="error-fact-variable-reference-not-allowed">
!               Error code <errorcode code="factVariableReferenceNotAllowed"/> <rfc2119>MUST</rfc2119> be thrown
!               if a filter that is associated with fact variables by a variable-set-filter relationship 
!               implies an XPath expression that includes an XPath variable reference to a general variable
!               or a fact variable.
!             </error>
            </p>
!           
!           <section id="sec-variable-set-filter-arc">
!             <head>Variable-set filter arcs</head>
!           
              <p>
!               <definition id="term-variable-set-filter-arc" term="variable-set filter arc">
!               A <term>variable-set filter arc</term> is expressed by the <elt>variable:variableSetFilterArc</elt>
!               element.</definition>
              </p>
  
              <p>
!               The syntax for the
!               <xmlref ref="xml-variable-set-filter-arc"><elt>variable:variableSetFilterArc</elt></xmlref>
!               element is defined by the normative schema supplied with this specification.
              </p>
  
!           </section><!-- Filter arcs -->
  
!         </section> <!-- variable-set-filter relationships -->
!       
!         <section id="sec-implicit-filters">
!           <head>Implicit filters</head>
    
!           <p>
!             Fact variables in a variable set <rfc2119>MAY</rfc2119> be associated with 
!             <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>,
!             defined in the Implicit filters specification <bibref ref="IMPLICITFILTERS"/>,
!             as well as filters that are related to them explicitly by 
!             <termref ref="term-variable-filter-relationship">variable-filter relationships</termref> and
!             <termref ref="term-variable-set-filter-relationship">variable-set-filter relationships</termref>.
!           </p>
  
!           <p>
!             A variable set <rfc2119>MUST</rfc2119> have an <att>implicitFiltering</att> attribute that is
!             equal to <val>true</val> if its fact variables are to have 
!             <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>.  
!             If the <att>implicitFiltering</att> attribute is equal to <val>false</val> then 
!             the fact variables in the variable set are not associated with implicit filters.
!           </p>
!           
!           <p>
!             <definition id="term-uses-implicit-filtering" term="uses implicit filtering">
!               A variable set <term>uses implicit filtering</term> if its 
!               <att>implicitFiltering</att> attribute equals <val>true</val>
!               and it does not use implicit filtering if the 
!               <att>implicitFiltering</att> attribute equals <val>false</val>.
!             </definition>
!           </p>
  
!           <p>
!             The implicit filters, if any, that are associated with the fact variables
!             in a variable set depend on the variable set's aspect model.
!           </p>
!           
!           <p>
!             If a variable set has a dimensional aspect model, then the 
!             fact variable in the variable set are associated with
!             <xtermref bibref="IMPLICITFILTERS" 
!             idref="term-dimensional-implicit-filters">dimensional implicit filters</xtermref>.
!           </p>
  
!           <p>
!             If a variable set has a non-dimensional aspect model, then the 
!             fact variable in the variable set are associated with
!             <xtermref bibref="IMPLICITFILTERS" 
!             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 -->      
  
    
          <section id="sec-preconditions">
            <head>Preconditions</head>
***************
*** 1466,1473 ****
              Variable set resources <rfc2119>MAY</rfc2119> be associated with 
              preconditions by
              <termref ref="term-variable-set-precondition-relationship">variable-set-precondition relationships</termref>.
!             Preconditions are define conditions that must be satisfied
!             if for a 
              <termref ref="term-variable-set-evaluation">variable set evaluation</termref>
              to occur.
            </p>
--- 1489,1495 ----
              Variable set resources <rfc2119>MAY</rfc2119> be associated with 
              preconditions by
              <termref ref="term-variable-set-precondition-relationship">variable-set-precondition relationships</termref>.
!             Preconditions define conditions that must be satisfied for a 
              <termref ref="term-variable-set-evaluation">variable set evaluation</termref>
              to occur.
            </p>
***************
*** 1612,1627 ****
        <p>
          <definition id="term-variable-set-evaluation" 
          term="variable-set evaluation">
!           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 
            <termref ref="term-satisfied-precondition">satisfied</termref>
            given the evaluations of the variables in the variable set.
          </definition>
-         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.
        </p>
  
        <p>
          <definition id="term-identical-variable-set-evaluation" term="identical variable-set evaluation">
--- 1634,1664 ----
        <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 
            <termref ref="term-satisfied-precondition">satisfied</termref>
            given the evaluations of the variables in the variable set.
          </definition>
        </p>
+       
+       <p>
+         The special cases are:
+       </p>
+       
+       <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">
***************
*** 1800,1813 ****
          <p>
            If the source sequence is empty, then the result
            of a fact variable evaluation also depends on the 
!           <att>bindEmpty</att> attribute and the <att>fallback</att>
!           attribute on the fact variable.
          </p>
  
          <p>
            <definition id="term-can-bind-to-an-empty-sequence" term="can bind to an empty sequence">
              A fact variable <term>can bind to an empty sequence</term> if it has a 
!             <att>bindEmpty</att> attribute with a value of <val>true</val>.
            </definition>
            Otherwise a fact variable cannot bind to an empty sequence and so, if the 
            source sequence is empty, the fact variable cannot be evaluated.
--- 1837,1849 ----
          <p>
            If the source sequence is empty, then the result
            of a fact variable evaluation also depends on the 
!           <att>fallbackValue</att> attribute on the fact variable.
          </p>
  
          <p>
            <definition id="term-can-bind-to-an-empty-sequence" term="can bind to an empty sequence">
              A fact variable <term>can bind to an empty sequence</term> if it has a 
!             <att>fallbackValue</att> attribute.
            </definition>
            Otherwise a fact variable cannot bind to an empty sequence and so, if the 
            source sequence is empty, the fact variable cannot be evaluated.
***************
*** 1815,1847 ****
  
          <p>
            If a fact variable can bind to an empty sequence, and the source sequence 
!           is empty, then the result of variable evaluation depends upon whether
!           the fact variable includes a <att>fallbackValue</att> attribute.
!         </p>
! 
!         <p>
!           If a fact variable does not include a <att>fallbackValue</att> attribute 
!           then the result of the fact variable evaluation is the empty sequence.
!           However, if a fact variable does include a <att>fallbackValue</att> attribute,
!           then 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>
            <definition id="term-fallback-value" term="fallback value">
!             A <term>fallback value</term> is the value of a fact variable whose value has been 
              determined on the basis of the content of the <att>fallbackValue</att> attribute.
            </definition>
          </p>
  
-         <p>
-           If a variable set contains fact variables but all of the fact variables in it 
-           evaluate to empty sequences or to fallback values, then the variable set is
-           not deemed to have been evaluated.
-         </p>
- 
        </section>
  
      </section>
--- 1851,1871 ----
  
          <p>
            If a fact variable can bind to an empty sequence, and the source sequence 
!           is empty, then the result of variable evaluation is determined by the 
!           <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>
            <definition id="term-fallback-value" term="fallback value">
!             A <term>fallback value</term> is the value of a fact variable that has been 
              determined on the basis of the content of the <att>fallbackValue</att> attribute.
            </definition>
          </p>
  
        </section>
  
      </section>
***************
*** 1873,1878 ****
--- 1897,1903 ----
            <includeChunk ref="boilerplate/references/XMLNAMES.xml"/>
            <includeChunk ref="boilerplate/references/XMLSCHEMA-STRUCTURES.xml"/>
            <includeChunk ref="boilerplate/references/XPATH2.xml"/>
+           <includeChunk ref="boilerplate/references/XQUERY.xml"/>
            <includeChunk ref="boilerplate/references/XFUNCTIONS.xml"/>        
            <includeChunk ref="boilerplate/references/XLINK.xml"/>
            <includeChunk ref="boilerplate/references/XSLT2.xml"/>
***************
*** 2405,2411 ****
              Public Working Draft without the unintended consequences.
            </p>
            <p>
!             From feedback by <personref ref="pablo"/>: 
              fixed up the erroneous reference to a <elt>formula:parameter</elt> instead
              of a <elt>variable:parameter</elt>; and
              fixed up the grammatical error "the how the" in the section on aspect models.
--- 2430,2436 ----
              Public Working Draft without the unintended consequences.
            </p>
            <p>
!             From feedback by <personref ref="person-pablo"/>: 
              fixed up the erroneous reference to a <elt>formula:parameter</elt> instead
              of a <elt>variable:parameter</elt>; and
              fixed up the grammatical error "the how the" in the section on aspect models.
***************
*** 2476,2481 ****
--- 2501,2619 ----
            </p>
          </revision>
  
+         <revision ref="person-geoff" day="16" month="02" year="2008">
+           <p>
+             Added a missing reference for XQuery.
+           </p>
+           <p>
+             Corrected reference to Pablo in the revision history.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="26" month="02" year="2008">
+           <p>
+             Removed the erroneous <code>or</code> from the end of the unit aspect test.
+             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>
+ 
+         <revision ref="person-geoff" day="07" month="03" year="2008">
+           <p>
+             Defined a default function namespace.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="08" month="03" year="2008">
+           <p>
+             Changed any to all to improve the clarity of the requirement
+             that aspect models include aspects for whatever content is
+             permitted in segments and scenarios.
+           </p>
+           <p>
+             Added a table summarising the aspects in the dimensional and
+             non-dimensional aspect models.
+           </p>
+           <p>
+             Eliminated the redundant <att>bindEmpty</att> attribute and simplified
+             the specification explanation for how fact variables evaluate when
+             their source sequences are empty.
+           </p>
+           <p>
+             Fixed grammatical errors in the definition of a precondition.
+           </p>
+           <p>
+             These changes were suggested by <personref ref="person-paul"/>.
+           </p>
+         </revision>        
+         
+         <revision ref="person-geoff" day="10" month="03" year="2008">
+           <p>
+             Grouped the various paragraphs contributing to the definition of a variable
+             set evaluation so that the complete definition is available in a single place
+             rather than having to be pieced together from different sections of the 
+             specification.
+           </p>
+           <p>
+             Clarified the reference to XSLT 2.0 sequence constructors as suggested
+             by <personref ref="person-phillip"/>.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" 
+         day="13" month="03" year="2008">
+           <p>
+             Created links from terms used in the introduction. 
+           </p>
+           <p>
+             Added explanation of the function of parameters to the parameter definition. 
+           </p>
+           <p>
+             Clarified motivation for XBRL custom functions by referencing the need to 
+             draw on information from the DTS supporting XBRL instances.
+           </p>
+           <p>
+             Flagged that the implementation of custom functions is outside the scope
+             of the variable specification.
+           </p>
+           <p>
+             Changed the reference to a formula processor to a reference
+             to a variable processor.
+           </p>
+           <p>
+             Clarified the wording in relation to sourcing of values for mandatory and
+             non-mandatory parameters.
+           </p>
+           <p>
+             Rearranged sections to minimise references to terms not already defined.
+           </p>
+           <p>
+             Simplified the definitions of the dimensional and
+             non-dimensional aspect models to avoid relying on references to the 
+             <att>aspectModel</att> attribute on variable sets.
+           </p>
+           <p>
+             Defined the unique text string identifier for an aspect model. 
+           </p>
+           <p>
+             Clarified that aspect tests are equivalence relations.
+           </p>
+           <p>
+             Relaxed the requirement on the aspects that had to be
+             included in all aspect models.
+           </p>
+           <p>
+             Added an explicit reference to the implicit filtering specification. 
+           </p>
+           <p>
+             These changes were in response to feedback by CompSci Resources.
+           </p>
+         </revision>
+ 
        </revisions>
  
      </section>
*** previous/variables.xml	2008-03-12 11:05:52.000000000 +0100
--- current/variables.xml	2008-03-20 20:38:18.000000000 +0100
***************
*** 37,45 ****
          <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,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>
***************
*** 59,78 ****
        <p>
          This specification is an extension to the XBRL Specification
          <bibref ref="XBRL" />. It defines syntax for declaration of
!         two kinds of variables: fact variables that only evaluate to
!         sequences of facts in an XBRL instance and general variables 
          that can evaluate to a broader range of values.  This 
!         specification also defines syntax for parameters that can be
!         given default values or values that are supplied by processing
          software.
        </p>
  
        <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>
--- 58,78 ----
        <p>
          This specification is an extension to the XBRL Specification
          <bibref ref="XBRL" />. It defines syntax for declaration of
!         two kinds of variables: <termref ref="term-fact-variable">fact variables</termref> 
!         that only evaluate to
!         sequences of facts in an XBRL instance and 
!         <termref ref="term-general-variable">general variables</termref> 
          that can evaluate to a broader range of values.  This 
!         specification also defines syntax for 
!         <termref ref="term-parameter">parameters</termref> 
!         that can be given default values or values that are supplied by processing
          software.
        </p>
  
        <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>
***************
*** 94,103 ****
        <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 node.
        </p>
  
        <p>
--- 94,101 ----
        <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>
  
        <p>
***************
*** 112,121 ****
        
        <p>
          The syntax for variables and parameters does not support 
!         specification of names that they can be referenced with in
!         XPath variable references. Instead, names are associated 
!         with variables and parameters by the resources (formulae, 
!         assertions, etc.) that depend on them. This enables variables
          and parameters to be referred to by different names when used
          in different contexts.
        </p>
--- 110,119 ----
        
        <p>
          The syntax for variables and parameters does not support 
!         specification of names that can be used as
!         XPath variable references. Instead, names are 
!         associated with variables and parameters by the relationships to the resources 
!         (formulae, assertions, etc.) that depend on them. This enables variables
          and parameters to be referred to by different names when used
          in different contexts.
        </p>
***************
*** 149,156 ****
          
          <p>
            This design makes it cumbersome to use XPath or XQuery
!           to select data from XBRL instances, at least without 
!           an extensive library of custom functions.
          </p>
  
          <p>
--- 147,155 ----
          
          <p>
            This design makes it cumbersome to use XPath or XQuery
!           to select data from XBRL instances based on their content and their
!           supporting discoverable taxonomy sets, at least without 
!           a library of custom functions.
          </p>
  
          <p>
***************
*** 256,437 ****
          </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 id="sec-custom-function-signature">
!           <head>Custom function signatures</head>
!   
!           <p>
!             <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">
!             A <term>custom function signature</term> is declared by a <elt>variable:function</elt>
!             element.</definition>
!           </p>
  
!           <p>
!             The syntax for the
!             <xmlref ref="xml-custom-function-signature"><elt>variable:function</elt></xmlref>
!             element is defined by the normative schema supplied with this specification.
!           </p>
  
!           <p>
!             Custom functions <rfc2119>MAY</rfc2119> 
!             be used within XPath expressions. 
!           </p>
!   
!           <p>
!             <error id="error-custom-function-without-signature">
!               Error code 
!               <errorcode code="noCustomFunctionSignature"/>
!               <rfc2119>MUST</rfc2119> be thrown 
!               if a custom function is used in an
!               XPath expression but does not have a custom function
!               signature within the discoverable taxonomy set that is 
!               being processed.
!             </error>
!           </p>
!   
!           <p>
!             The <att>name</att> attribute on a custom function signature 
!             contains the QName of the custom function.
!           </p>
!   
!           <p>
!             The value of the <att>output</att> attribute on a custom 
!             function signature specifies the data type of the result 
!             produced by evaluating the custom function.
!           </p>
!           
!           <p>
!             The <elt>variable:input</elt> elements, if any, of a custom function
!             signature specify the data types of the custom function's input
!             parameters.  The value of the <att>type</att> attribute on 
!             <elt>variable:input</elt> elements specifies the data type of the 
!             input parameter.
!           </p>
!   
!           <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>
!   
!         </section>
!   
!         <section id="sec-parameters">
!           <head>Parameters</head>
!   
!           <p>
!             <definition id="term-parameter" term="parameter">
!             A <term>parameter</term> is declared by a <elt>variable:parameter</elt>
!             element.</definition>
!           </p>
!           
!           <p>
!             The syntax for the
!             <xmlref ref="xml-parameter"><elt>variable:parameter</elt></xmlref>
!             element is defined by the normative schema supplied with this specification.
!           </p>
  
!           <p>
!             The <att>name</att> attribute on a parameter 
!             declaration contains the QName of the parameter 
!             being declared.  This is the QName used by the
!             formula processor to uniquely identify the parameter
!             when setting its value.  It is not the QName by which
!             the parameter is referenced when it is used.
!             That QName is specified by relationship of the
!             parameter to the resource that makes use of it.
!           </p>
!             
!           <p>
!             <error id="error-parameter-name-clash">
!               Error code 
!               <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>
!           </p>            
!             
!           <p>
!             If the <att>required</att> attribute on a parameter declaration 
!             is equal to <val>true</val>, then the parameter is mandatory; 
!             its value <rfc2119>MUST</rfc2119> be supplied by 
!             the processing application. 
!           </p>
!     
!           <p>
!             The value of the parameter <rfc2119>MAY</rfc2119> be supplied 
!             by the processing application. If no value is supplied by the 
!             processing application and if the parameter is
!             not mandatory, then the supplied value <rfc2119>MAY</rfc2119> 
!             be computed using the XPath expression given in the 
!             <att>select</att> attribute.
!           </p>
!   
!           <p>
!             A parameter declaration <rfc2119>MAY</rfc2119> 
!             contain an <att>as</att> attribute that
!             specifies the data type required by the parameter.
!           </p>
!           
!           <p>
!             <error id="error-parameter-type-mismatch">
!               Error code 
!               <errorcode code="parameterTypeMismatch"/>
!               <rfc2119>MUST</rfc2119> be thrown if the parameter value,
!               either supplied by the caller or determined from the 
!               <att>select</att> attribute on the parameter, 
!               cannot be converted to the specified data type.
!             </error>
!           </p>
!   
!           <p>
!             <xtermref bibref="XSLT2" idref="dt-sequence-constructor">
!             Sequence constructors
!             </xtermref> 
!             are not available for declaring default parameter values.
!           </p>
            
!         </section>
  
-       </section>
-       
-     </section>
-     
      <section id="sec-syntax">
        <head>Syntax</head>
  
        <includeChunk ref="boilerplate/syntax-explanation.xml"/>
  
        <section id="sec-general-variables">
          <head>General variables</head>
          <p>
            <definition id="term-general-variable" term="general variable">
!           A <term>general variable</term> is declared by a <elt>variable:generalVariable</elt>
!           element.</definition>
          </p>
          
          <p>
--- 255,800 ----
          </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>
  
!     <section id="sec-aspects">
!       <head>Aspects</head>
  
!       <p>
!         XBRL facts are not just values.  They are supported by 
!         a wide range of additional information that provides the 
!         information necessary to interpret the values contained
!         by XBRL facts.
!       </p>
  
!       <p>
!         <definition id="term-aspect" term="aspect">
!           An <term>aspect</term> is defined as one part of the
!           additional information about an XBRL fact.
!         </definition>
!       </p>
! 
!       <p>
!         All aspect definitions <rfc2119>MUST</rfc2119> include the definition
!         of the <termref ref="term-aspect-test">aspect test</termref> to use 
!         when assessing the equivalency of two values
!         for the aspect being defined.
!       </p>
! 
!       <p>
!         <definition id="term-aspect-test" term="aspect test">
!           An <term>aspect test</term> is an XPath expression that defines an 
!           equivalence relation for values of its aspect.
!         </definition>
!       </p>
! 
!       <p>
!         <definition id="term-equivalent-aspect-value" term="equivalent aspect value">
!           Two facts have <term>equivalent values for a given aspect</term> if the 
!           <termref ref="term-aspect-test">aspect test</termref>
!           for that aspect evaluates to true. 
!         </definition>
!       </p>
! 
!       <p>
!         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>
!         <definition id="term-match" term="match">
!           Two values for the one aspect <term>match</term> if the 
!           <termref ref="term-aspect-test">aspect test</termref>
!           for that aspect returns true when evaluated with two variables, 
!           one of which has the first value for the aspect and the other
!           of which has the second value for the aspect.
!         </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>$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>
! 
!       <p>
!         This specification defines the following aspects for all facts, including 
!         tuples:
!       </p>
! 
!       <ulist>
!         <item>
!           <definition id="term-location-aspect" term="location aspect">
!             The <term>location</term> of the fact 
!             is the ordered sequence of elements from the <elt>xbrli:xbrl</elt> element
!             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">
!             The <term>concept aspect</term> is the concept that 
!             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>
! 
!       <p>
!         This specification defines the following aspects for 
!         all items, but not for tuples:
!       </p>
! 
!       <ulist>
!         <item>
!           <definition id="term-entity-identifier-aspect" term="entity identifier aspect">
!             The <term>entity identifier aspect</term> is the identifier of the entity that 
!             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">
!             The <term>period aspect</term> is the period that 
!             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 
!         for numeric items only:
!       </p>
! 
!       <ulist>
!         <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>
! 
!         <p>
!           There are a number of different ways that the additional
!           information about an XBRL fact can be separated into a set
!           of aspects. For example, the entity identification
!           information could be treated as a single aspect or it
!           could be treated as an entity identification scheme aspect
!           and an entity identification value aspect. More
!           significantly, the content of a segment or scenario can be
!           treated as a single aspect or it can be broken down into a
!           potentially large number of aspects.
!         </p>
! 
!         <p>
!           <definition id="term-aspect-model" term="aspect model">
!             An <term>aspect model</term> is a definition of 
!             how the information about a fact will be split into 
!             separate aspects.
!           </definition>
!         </p>
! 
!         <p>
!           <definition id="term-aspect-model-identifier" term="aspect model identifier">
!             An <term>aspect model identifier</term> is a text string that can be used
!             to identify an aspect model.
!           </definition>
!         </p>
! 
!         <p>
!           All aspect model definitions <rfc2119>MUST</rfc2119>
!           specify the aspect model identifier the for the aspect model being defined.
!         </p>
! 
!         <p>
!           All aspect models <rfc2119>MUST</rfc2119> include the following aspects:            
!         </p>
! 
!         <ulist>
!           <item><termref ref="term-location-aspect">location aspect</termref></item>
!           <item><termref ref="term-concept-aspect">concept aspect</termref></item>
!           <item><termref ref="term-entity-identifier-aspect">entity-identifier aspect</termref></item>
!           <item><termref ref="term-period-aspect">period aspect</termref></item>
!           <item><termref ref="term-unit-aspect">unit aspect</termref></item>
!         </ulist>
! 
!         <p>
!           All aspect models <rfc2119>MUST</rfc2119> include sufficient aspects 
!           to ensure that all content in both the contexts and units of facts is 
!           associated with at least one aspect.
!         </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>
! 
!         <table id="table-aspect-models">
!           <caption>Aspect inclusion in aspects models</caption>
!           <thead>
!             <tr>
!               <th>Aspect</th>
!               <th colspan="2">Aspect model</th>
!             </tr>
!             <tr>
!               <th/>
!               <th>Dimensional</th>
!               <th>Non-dimensional</th>
!             </tr>
!           </thead>
!           <tbody>
!             <tr>
!               <td>Location</td>
!               <td>include</td>
!               <td>include</td>
!             </tr>
!             <tr>
!               <td>Concept</td>
!               <td>include</td>
!               <td>include</td>
!             </tr>
!             <tr>
!               <td>Entity identifier</td>
!               <td>include</td>
!               <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>
!           </tbody>
!         </table>
! 
!       </section><!-- Aspect models -->    
            
!     </section><!-- Aspects -->    
  
      <section id="sec-syntax">
        <head>Syntax</head>
  
        <includeChunk ref="boilerplate/syntax-explanation.xml"/>
  
+       <section id="sec-custom-function-signature">
+         <head>Custom function signatures</head>
+ 
+         <p>
+           <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">
+           A <term>custom function signature</term> is declared by a <elt>variable:function</elt>
+           element.</definition>
+         </p>
+ 
+         <p>
+           The syntax for the
+           <xmlref ref="xml-custom-function-signature"><elt>variable:function</elt></xmlref>
+           element is defined by the normative schema supplied with this specification.
+         </p>
+ 
+         <p>
+           Custom functions <rfc2119>MAY</rfc2119> 
+           be used within XPath expressions. 
+         </p>
+ 
+         <p>
+           <error id="error-custom-function-without-signature">
+             Error code 
+             <errorcode code="noCustomFunctionSignature"/>
+             <rfc2119>MUST</rfc2119> be thrown 
+             if a custom function is used in an
+             XPath expression but does not have a custom function
+             signature within the discoverable taxonomy set that is 
+             being processed.
+           </error>
+         </p>
+ 
+         <p>
+           The <att>name</att> attribute on a custom function signature 
+           contains the QName of the custom function.
+         </p>
+ 
+         <p>
+           The value of the <att>output</att> attribute on a custom 
+           function signature specifies the data type of the result 
+           produced by evaluating the custom function.
+         </p>
+         
+         <p>
+           The <elt>variable:input</elt> elements, if any, of a custom function
+           signature specify the data types of the custom function's input
+           parameters.  The value of the <att>type</att> attribute on 
+           <elt>variable:input</elt> elements specifies the data type of the 
+           input parameter.
+         </p>
+ 
+         <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>
+         
+         <p>
+           The implementation of a custom function is outside of the 
+           scope of this specification.
+         </p>
+ 
+       </section>
+ 
+       <section id="sec-parameters">
+         <head>Parameters</head>
+ 
+         <p>
+           <definition id="term-parameter" term="parameter">
+           A <term>parameter</term> is declared by a <elt>variable:parameter</elt>
+           element and can be given default values, specified as part of their declaration,
+           or values that are supplied by processing software.</definition>
+         </p>
+         
+         <p>
+           The syntax for the
+           <xmlref ref="xml-parameter"><elt>variable:parameter</elt></xmlref>
+           element is defined by the normative schema supplied with this specification.
+         </p>
+ 
+         <p>
+           The <att>name</att> attribute on a parameter 
+           declaration contains the QName of the parameter 
+           being declared.  This is the QName used by the
+           variable processor to uniquely identify the parameter
+           when setting its value.  It is not the QName by which
+           the parameter is referenced when it is used.
+           That QName is specified by relationship of the
+           parameter to the resource that makes use of it.
+         </p>
+           
+         <p>
+           <error id="error-parameter-name-clash">
+             Error code 
+             <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>
+         </p>            
+           
+         <p>
+           If the <att>required</att> attribute on a parameter declaration 
+           is equal to <val>true</val>, then the parameter is mandatory; 
+           its value <rfc2119>MUST</rfc2119> be supplied by 
+           the processing application. 
+         </p>
+   
+         <p>
+           Otherwise, the value of the parameter <rfc2119>MAY</rfc2119> be supplied 
+           by the processing application. If no value is supplied by the 
+           processing application and if the parameter is
+           not mandatory, then the supplied value <rfc2119>MAY</rfc2119> 
+           be computed using the XPath expression given in the 
+           <att>select</att> attribute.
+         </p>
+ 
+         <p>
+           A parameter declaration <rfc2119>MAY</rfc2119> 
+           contain an <att>as</att> attribute that
+           specifies the data type required by the parameter.
+         </p>
+         
+         <p>
+           <error id="error-parameter-type-mismatch">
+             Error code <errorcode code="parameterTypeMismatch"/>
+             <rfc2119>MUST</rfc2119> be thrown if the parameter value,
+             either supplied by the caller or determined from the 
+             <att>select</att> attribute on the parameter, 
+             cannot be converted to the specified data type.
+           </error>
+         </p>
+ 
+         <p>
+           Unlike parameters in the XSLT 2.0 specification <bibref ref="XSLT2"/>, the parameters
+           defined in this specification cannot contain
+           <xtermref bibref="XSLT2" idref="dt-sequence-constructor">sequence 
+           constructors</xtermref>.
+         </p>
+         
+       </section>
+ 
        <section id="sec-general-variables">
          <head>General variables</head>
          <p>
            <definition id="term-general-variable" term="general variable">
!             A <term>general variable</term> is declared by a <elt>variable:generalVariable</elt>
!             element.
!           </definition>
          </p>
          
          <p>
***************
*** 461,468 ****
  
          <p>
            <definition id="term-fact-variable" term="fact variable">
!           A <term>fact variable</term> is declared by a <elt>variable:factVariable</elt>
!           element.</definition>
          </p>
  
          <p>
--- 824,832 ----
  
          <p>
            <definition id="term-fact-variable" term="fact variable">
!             A <term>fact variable</term> is declared by a <elt>variable:factVariable</elt>
!             element.
!           </definition>
          </p>
  
          <p>
***************
*** 478,486 ****
          </p>
  
          <p>
!           The <att>bindEmpty</att> attribute and the optional <att>fallbackValue</att>
!           attribute on fact variables also have implications for their evaluation, 
!           as set out in 
            <sectionref ref="sec-binding-to-empty-sequence"/>.
          </p>
  
--- 842,849 ----
          </p>
  
          <p>
!           The optional <att>fallbackValue</att> attribute on fact variables 
!           also has implications for their evaluation, as set out in 
            <sectionref ref="sec-binding-to-empty-sequence"/>.
          </p>
  
***************
*** 498,506 ****
  
          <p>
            This term is followed by an 
!           <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.
            The expression in the XPath predicate includes an 
--- 861,868 ----
  
          <p>
            This term is followed by an 
!           <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.
            The expression in the XPath predicate includes an 
***************
*** 518,526 ****
  
          <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>
  
--- 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>
  
***************
*** 543,551 ****
            the XPath expressions implied by the filters and the filter 
            complements are combined using the  
            <code>and</code> token to form a single 
!           <xtermref bibref="XPATH2" idref="doc-xpath-AndExpr"> 
!           XPath and-expression
!           </xtermref>.
          </p>
  
          <section id="sec-filters">
--- 903,910 ----
            the XPath expressions implied by the filters and the filter 
            complements are combined using the  
            <code>and</code> token to form a single 
!           <xtermref bibref="XPATH2" idref="doc-xpath-AndExpr">XPath 
!           and-expression</xtermref>.
          </p>
  
          <section id="sec-filters">
***************
*** 561,569 ****
            <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>
  
--- 920,927 ----
            <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>
  
***************
*** 586,592 ****
            <p>
              All filters <rfc2119>MUST</rfc2119> imply an XPath 
              expression that can be evaluated using any fact as a 
!             context node.
            </p>
            
            <p>
--- 944,950 ----
            <p>
              All filters <rfc2119>MUST</rfc2119> imply an XPath 
              expression that can be evaluated using any fact as a 
!             context item.
            </p>
            
            <p>
***************
*** 597,606 ****
  
            <p>
              The XPath expression implied by a filter <rfc2119>MAY</rfc2119>
!             include 
!             <xtermref bibref="XPATH2" idref="dt-variable-reference">
!             XPath variable references
!             </xtermref>. 
              Resolution of XPath variable references in the XPath expressions
              implied by filters is beyond the scope of this specification.  
              Resolution of such XPath variable references needs to be addressed
--- 955,962 ----
  
            <p>
              The XPath expression implied by a filter <rfc2119>MAY</rfc2119>
!             include <xtermref bibref="XPATH2" idref="dt-variable-reference">XPath 
!             variable references</xtermref>. 
              Resolution of XPath variable references in the XPath expressions
              implied by filters is beyond the scope of this specification.  
              Resolution of such XPath variable references needs to be addressed
***************
*** 613,619 ****
              A fact meets the criteria specified by a
              filter only if the result of evaluating the 
              XPath expression implied by that filter,
!             using the fact as the context node,
              results in an 
              <xtermref bibref="XPATH2" idref="dt-ebv">
              effective Boolean value</xtermref>
--- 969,975 ----
              A fact meets the criteria specified by a
              filter only if the result of evaluating the 
              XPath expression implied by that filter,
!             using the fact as the context item,
              results in an 
              <xtermref bibref="XPATH2" idref="dt-ebv">
              effective Boolean value</xtermref>
***************
*** 621,627 ****
            </p>
  
            <p>
!             Every explicit filter specification 
              <rfc2119>MUST</rfc2119> indicate the
              <termref ref="term-aspect">aspects</termref>, if any, that it can
              <termref ref="term-covers-an-aspect">cover</termref>.
--- 977,998 ----
            </p>
  
            <p>
!             <definition id="term-covers-an-aspect" term="covers an aspect">
!               A filter can <term>cover an aspect</term> if it selects facts 
!               using that aspect as a selection criterion.
!             </definition>
!           </p>
!     
!           <p>
!             <definition id="term-uncovered-aspect" term="uncovered aspect">
!               An <term>uncovered aspect</term> of a fact variable is an aspect that is 
!               not covered by any of the filters that are being used to construct
!               the XPath expression implied by the variable.
!             </definition>
!           </p>
! 
!           <p>
!             Every filter specification 
              <rfc2119>MUST</rfc2119> indicate the
              <termref ref="term-aspect">aspects</termref>, if any, that it can
              <termref ref="term-covers-an-aspect">cover</termref>.
***************
*** 690,707 ****
              <p>
                <definition id="term-variable-filter-relationship" 
                term="variable-filter relationship">
!                 A 
!                 <term>variable-filter relationship</term> 
                  is a relationship between an 
!                 <termref ref="term-fact-variable">
!                   fact variable
!                 </termref> 
!                 and a 
!               <termref ref="term-filter">
!                   filter
!                 </termref> 
!                 expressed by an
!                 <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
                </definition>
              </p>
            
--- 1061,1071 ----
              <p>
                <definition id="term-variable-filter-relationship" 
                term="variable-filter relationship">
!                 A <term>variable-filter relationship</term> 
                  is a relationship between an 
!                 <termref ref="term-fact-variable">fact variable</termref> 
!                 and a <termref ref="term-filter">filter</termref> 
!                 expressed by an <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
                </definition>
              </p>
            
***************
*** 713,734 ****
              <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>
                  have a fact variable at the 
!                 <xtermref bibref="XLINK" idref="dt-starting-resource">
!                   starting resource of the arc
!                 </xtermref>
                </item>
                <item>
                  have a filter at the 
!                 <xtermref bibref="XLINK" idref="dt-ending-resource">
!                   ending resource of the arc
!                 </xtermref>
                </item>
              </ulist>
  
--- 1077,1092 ----
              <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>
                  have a fact variable at the 
!                 <xtermref bibref="XLINK" idref="dt-starting-resource">starting resource of the arc</xtermref>
                </item>
                <item>
                  have a filter at the 
!                 <xtermref bibref="XLINK" idref="dt-ending-resource">ending resource of the arc</xtermref>
                </item>
              </ulist>
  
***************
*** 741,749 ****
              <p>
                Variable-filter relationships <rfc2119>MUST</rfc2119>
                be expressed by 
!               <termref ref="term-variable-filter-arc">
!               variable-filter arcs
!               </termref>.
                Violations of this requirement can be 
                detected by validation against the XBRL Specification
                <bibref ref="XBRL"/>. 
--- 1099,1105 ----
              <p>
                Variable-filter relationships <rfc2119>MUST</rfc2119>
                be expressed by 
!               <termref ref="term-variable-filter-arc">variable-filter arcs</termref>.
                Violations of this requirement can be 
                detected by validation against the XBRL Specification
                <bibref ref="XBRL"/>. 
***************
*** 757,940 ****
              </p>
  
              <p>
!               A fact variable with a complemented variable-filter relationship to a filter
!               uses the 
!               <termref ref="term-filter-complement">
!               filter complement
!               </termref> 
!               in its implied XPath expression rather than the filter itself.
!             </p>
! 
!             <p>
!               <definition id="term-covering-variable-filter-relationship" term="covering variable-filter relationship">
!                 A <term>covering variable-filter relationship</term> is a variable-filter relationship
!                 that is expressed by an arc with a <att>cover</att> attribute that has a value of <val>true</val>.
!               </definition>
!             </p>
! 
!             <p>
!                 If a filter is related to a variable by a variable-filter relationship, that
!                 filter only covers aspects of the facts being filtered if the variable-filter
!                 relationship is 
!                 <termref ref="term-covering-variable-filter-relationship">
!                 covering
!                 </termref>. 
!             </p>
!             
!             <section id="sec-variable-filter-arc">
!               <head>Variable-filter arcs</head>
!             
!               <p>
!                 <definition id="term-variable-filter-arc" term="variable-filter arc">
!                 A <term>variable-filter arc</term> is expressed by the <elt>variable:variableFilterArc</elt>
!                 element.</definition>
!               </p>
! 
!               <p>
!                 The syntax for the
!                 <xmlref ref="xml-variable-filter-arc"><elt>variable:variableFilterArc</elt></xmlref>
!                 element is defined by the normative schema supplied with this specification.
!               </p>
! 
!             </section><!-- Variable-filter arcs -->
!             
!           </section><!-- Variable-filter relationships -->
! 
!           <section id="sec-variable-set-filter-relationships">
!             <head>Variable-set-filter relationships</head>
!             
!             <p>
!               <definition id="term-variable-set-filter-relationship" 
!               term="variable-set-filter relationship">
!                 A 
!                 <term>variable-set-filter relationship</term> 
!                 is a relationship between a 
!                 <termref ref="term-variable-set-resource">
!                   variable set resource
!                 </termref> 
!                 and a 
!               <termref ref="term-filter">
!                   filter
!                 </termref> 
!                 expressed by an
!                 <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
!               </definition>
!             </p>
!           
!             <p>
!               To declare a variable-set-filter relationship an
!               XLink arc <rfc2119>MUST</rfc2119>:
!             </p>
!             
!             <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>
!                 have an XLink resource that defines a 
!                 <termref ref="term-variable-set">variable set</termref>
!                 at the 
!                 <xtermref bibref="XLINK" idref="dt-starting-resource">
!                   starting resource of the arc
!                 </xtermref>
!               </item>
!               <item>
!                 have a filter at the 
!                 <xtermref bibref="XLINK" idref="dt-ending-resource">
!                   ending resource of the arc
!                 </xtermref>
!               </item>
!             </ulist>
!   
!             <p>
!               The arcrole value, 
!               <xmlref ref="variable-filter"><val>http://xbrl.org/arcrole/2008/variable-set-filter</val></xmlref>,
!               is declared in the normative schema supplied with this specification.
!             </p>
! 
!             <p>
!               Variable-set-filter relationships <rfc2119>MUST</rfc2119>
!               be expressed by 
!               <termref ref="term-variable-set-filter-arc">
!               variable-set filter arcs
!               </termref>.
!               Violations of this requirement can be 
!               detected by validation against the XBRL Specification
!               <bibref ref="XBRL"/>. 
!             </p>
! 
!             <p>
!               A filter participating in a variable-set-filter relationship is,
!               by definition, associated with each of the fact variables in variable
!               set defined by the resource that it is related to.
!             </p>
!             
!             <p>
!               <definition id="term-group-filter" term="group-filter">
!                 A filter that is associated with a fact variable by a variable-set-filter relationship is
!                 referred to as a <term>group filter</term>.
!               </definition>
!             </p>
!             
!             <p>
!               <definition id="term-complemented-variable-set-filter-relationship" term="complemented variable-set-filter relationship">
!                 A <term>complemented variable-set-filter relationship</term> is a variable-set-filter relationship
!                 that is expressed by an arc with a <att>complement</att> attribute that has a value of <val>true</val>.
!               </definition>
!             </p>
! 
!             <p>
!               The fact variables in a variable set defined by a resource with a complemented 
!               variable-set-filter relationship to a filter use the 
!               <termref ref="term-filter-complement">
!               filter complement
!               </termref> 
!               in their implied XPath expressions rather than the filter itself.
!             </p>
! 
!             <p>
!               All filters that are associated with fact variables 
!               by variable-set-filter relationships, by definition,
!               do not cover any aspects.
              </p>
  
              <p>
!               Filters that are associated with fact variables by variable-set-filter relationships 
!               <rfc2119>MUST NOT</rfc2119> imply XPath expressions that include XPath variable references
!               to general variables or fact variables.
              </p>
  
              <p>
!               <error id="error-fact-variable-reference-not-allowed">
!                 Error code <errorcode code="factVariableReferenceNotAllowed"/> <rfc2119>MUST</rfc2119> be thrown
!                 if a filter that is associated with fact variables by a variable-set-filter relationship 
!                 implies an XPath expression that includes an XPath variable reference to a general variable
!                 or a fact variable.
!               </error>
              </p>
              
!             <section id="sec-variable-set-filter-arc">
!               <head>Variable-set filter arcs</head>
              
                <p>
!                 <definition id="term-variable-set-filter-arc" term="variable-set filter arc">
!                 A <term>variable-set filter arc</term> is expressed by the <elt>variable:variableSetFilterArc</elt>
!                 element.</definition>
                </p>
  
                <p>
                  The syntax for the
!                 <xmlref ref="xml-variable-set-filter-arc"><elt>variable:variableSetFilterArc</elt></xmlref>
                  element is defined by the normative schema supplied with this specification.
                </p>
  
!             </section><!-- Filter arcs -->
! 
!           </section> <!-- variable-set-filter relationships -->
  
          </section><!--  Filters -->
  
--- 1113,1156 ----
              </p>
  
              <p>
!               A fact variable with a complemented variable-filter relationship to a filter
!               uses the 
!               <termref ref="term-filter-complement">filter complement</termref> 
!               in its implied XPath expression rather than the filter itself.
              </p>
  
              <p>
!               <definition id="term-covering-variable-filter-relationship" term="covering variable-filter relationship">
!                 A <term>covering variable-filter relationship</term> is a variable-filter relationship
!                 that is expressed by an arc with a <att>cover</att> attribute that has a value of <val>true</val>.
!               </definition>
              </p>
  
              <p>
!                 If a filter is related to a variable by a variable-filter relationship, that
!                 filter only covers aspects of the facts being filtered if the variable-filter
!                 relationship is <termref ref="term-covering-variable-filter-relationship">covering</termref>. 
              </p>
              
!             <section id="sec-variable-filter-arc">
!               <head>Variable-filter arcs</head>
              
                <p>
!                 <definition id="term-variable-filter-arc" term="variable-filter arc">
!                   A <term>variable-filter arc</term> is expressed by 
!                   the <elt>variable:variableFilterArc</elt> element.
!                 </definition>
                </p>
  
                <p>
                  The syntax for the
!                 <xmlref ref="xml-variable-filter-arc"><elt>variable:variableFilterArc</elt></xmlref>
                  element is defined by the normative schema supplied with this specification.
                </p>
  
!             </section><!-- Variable-filter arcs -->
!             
!           </section><!-- Variable-filter relationships -->
  
          </section><!--  Filters -->
  
***************
*** 945,953 ****
  
          <p>
            The XPath expressions implied by variables can include
!           <xtermref bibref="XPATH2" idref="id-variables">
!           XPath variable references
!           </xtermref>
            that need to be resolved to other fact or general variables.
            This reference can only be resolved if the variable implying 
            the XPath expression and the variable being referenced are
--- 1161,1167 ----
  
          <p>
            The XPath expressions implied by variables can include
!           <xtermref bibref="XPATH2" idref="id-variables">XPath variable references</xtermref>
            that need to be resolved to other fact or general variables.
            This reference can only be resolved if the variable implying 
            the XPath expression and the variable being referenced are
***************
*** 975,1002 ****
            to a variable-set resource are in the variable set defined by that resource.
          </p>
  
          <section id="sec-variable-set-relationships">
            <head>Variable-set relationships</head>
  
            <p>
!             <definition id="term-variable-set-relationship" 
!             term="variable-set relationship">
!               A 
!               <term>variable-set relationship</term> 
!               is a relationship between a 
                <termref ref="term-variable-set">variable-set resource</termref> 
                and either a 
!             <termref ref="term-fact-variable">
!                 fact variable
!               </termref> or a 
!             <termref ref="term-general-variable">
!                 general variable
!               </termref>, or a 
!             <termref ref="term-parameter">
!                 parameter
!               </termref> 
!               expressed by an
!               <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
              </definition>
            </p>
  
--- 1189,1230 ----
            to a variable-set resource are in the variable set defined by that resource.
          </p>
  
+         <p>
+           Variable sets identify their <termref ref="term-aspect-model">aspect model</termref>
+           using their <att>aspectModel</att> attribute. The value of the <att>aspectModel</att> 
+           attribute on a variable-set resource is the <termref ref="term-aspect-model-identifier">aspect 
+           model identifier</termref> of the aspect model to be used when evaluating variables in 
+           the variable set defined by the variable-set resource.
+         </p>
+ 
+         <p>
+           <definition id="term-variable-sets-aspect-model" term="variable set's aspect model ">
+             A <term>variable set's aspect model</term> is the aspect model identified by
+             the <att>aspectModel</att> attribute on the variable-set resource defining the 
+             variable set.
+           </definition>
+         </p>
+         
+         <p>
+           <error id="error-unknown-aspect-model">
+             Error code <errorcode code="unknownAspectModel"/> <rfc2119>MUST</rfc2119> be
+             thrown if the processing software does not recognise the aspect model 
+             identified by the value of an <att>aspectModel</att> attribute.
+           </error>
+         </p>
+ 
          <section id="sec-variable-set-relationships">
            <head>Variable-set relationships</head>
  
            <p>
!             <definition id="term-variable-set-relationship" term="variable-set relationship">
!               A <term>variable-set relationship</term> is a relationship between a 
                <termref ref="term-variable-set">variable-set resource</termref> 
                and either a 
!             <termref ref="term-fact-variable">fact variable</termref> or a 
!             <termref ref="term-general-variable">general variable</termref>, or a 
!             <termref ref="term-parameter">parameter</termref> expressed by an
!             <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
              </definition>
            </p>
  
***************
*** 1008,1030 ****
            <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>
                have a variable-set resource at the 
!               <xtermref bibref="XLINK" idref="dt-starting-resource">
!                 starting resource of the arc
!               </xtermref>
              </item>
              <item>
                have a parameter or a fact variable  
                or a general variable at the 
!               <xtermref bibref="XLINK" idref="dt-ending-resource">
!                 ending resource of the arc
!               </xtermref>
              </item>
            </ulist>
  
--- 1236,1254 ----
            <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>
                have a variable-set resource at the 
!               <xtermref bibref="XLINK" idref="dt-starting-resource">starting 
!               resource of the arc</xtermref>
              </item>
              <item>
                have a parameter or a fact variable  
                or a general variable at the 
!               <xtermref bibref="XLINK" idref="dt-ending-resource">ending 
!               resource of the arc</xtermref>
              </item>
            </ulist>
  
***************
*** 1039,1047 ****
            <p>
              Variable-set relationships <rfc2119>MUST</rfc2119>
              be expressed by 
!             <termref ref="term-variable-arc">
!             variable arcs
!             </termref>.
              Violations of this requirement can be 
              detected by validation against the XBRL Specification
              <bibref ref="XBRL"/>. 
--- 1263,1269 ----
            <p>
              Variable-set relationships <rfc2119>MUST</rfc2119>
              be expressed by 
!             <termref ref="term-variable-arc">variable arcs</termref>.
              Violations of this requirement can be 
              detected by validation against the XBRL Specification
              <bibref ref="XBRL"/>. 
***************
*** 1081,1463 ****
            
          </section><!-- Variable-set relationships -->
  
!         <section id="sec-aspects">
!           <head>Aspects</head>
! 
            <p>
!             XBRL facts are not just values.  They are supported by 
!             a wide range of additional information that provides the 
!             information necessary to interpret the values contained
!             by XBRL facts.
            </p>
! 
            <p>
!             <definition id="term-aspect" term="aspect">
!               An <term>aspect</term> is defined as one part of the
!               additional information about an XBRL fact.
!             </definition>
            </p>
  
            <p>
!             <definition id="term-covers-an-aspect" term="covers an aspect">
!               A filter can <term>cover an aspect</term> if it selects facts 
!               using that aspect as a selection criterion.
!             </definition>
            </p>
  
            <p>
!             <definition id="term-uncovered-aspect" term="uncovered aspect">
!               An <term>uncovered aspect</term> of a fact variable is an aspect that is 
!               not covered by any of the filters that are being used to construct
!               the XPath expression implied by the variable.
!             </definition>
            </p>
  
            <p>
!             <definition id="term-equivalent-aspect-value" term="equivalent aspect value">
!               Two facts have <term>equivalent values for a given aspect</term> if the 
!               <termref ref="term-aspect-test">aspect test</termref>
!               for that aspect evaluates to true.
!             </definition>
            </p>
! 
            <p>
!             <definition id="term-aspect-test" term="aspect test">
!               For two facts, an <term>aspect test</term> is an XPath expression 
!               that can be used to test whether the aspect being tested is not
!               reported for both facts or is reported with an equivalent value
!               for both facts.
              </definition>
-             The context item when evaluating all aspect tests is the 
-             <elt>xbrli:xbrl</elt> element of the target XBRL instance.
            </p>
! 
            <p>
!             All aspect definitions <rfc2119>MUST</rfc2119> include the definition
!             of the aspect test to use when assessing the equivalency of two values
!             for the aspect being defined.
!             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>
  
            <p>
!             <definition id="term-match" term="match">
!               Two values for the one aspect <term>match</term> if the 
!               <termref ref="term-aspect-test">aspect test</termref>
!               for that aspect returns true when evaluated with two variables, 
!               one of which has the first value for the aspect and the other
!               of which has the second value for the aspect.
!             </definition>
            </p>
  
            <p>
!             This specification defines the following aspects for all facts, including 
!             tuples:
            </p>
  
-           <ulist>
-             <item>
-               <definition id="term-location-aspect" term="location aspect">
-                 The <term>location</term> of the fact 
-                 is the ordered sequence of elements from the <elt>xbrli:xbrl</elt> element
-                 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">
-                 The <term>concept aspect</term> is the concept that 
-                 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>
- 
            <p>
!             This specification defines the following aspects for 
!             all items, but not for tuples:
            </p>
  
-           <ulist>
-             <item>
-               <definition id="term-entity-identifier-aspect" term="entity identifier aspect">
-                 The <term>entity identifier aspect</term> is the identifier of the entity that 
-                 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">
-                 The <term>period aspect</term> is the period that 
-                 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:fact-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:fact-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 
!             for numeric items only:
            </p>
! 
!           <ulist>
!             <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)) or
!               </code>
!             </item>
!           </ulist>
! 
!           <section id="sec-aspect-model">
!             <head>Aspect models</head>
! 
!             <p>
!               There are a number of different ways that the additional
!               information about an XBRL fact can be separated into a set
!               of aspects. For example, the entity identification
!               information could be treated as a single aspect or it
!               could be treated as an entity identification scheme aspect
!               and an entity identification value aspect. More
!               significantly, the content of a segment or scenario can be
!               treated as a single aspect or it can be broken down into a
!               potentially large number of aspects.
!             </p>
!   
!             <p>
!               <definition id="term-aspect-model" term="aspect model">
!                 An <term>aspect model</term> is a definition of 
!                 how the information about a fact will be split into 
!                 separate aspects.
!               </definition>
!             </p>
! 
              <p>
!               This specification defines two aspect models.
!               Specifications that define new aspect models will need to specify new values 
!               for the <att>aspectModel</att> attribute to identify the new aspect models.
              </p>
  
              <p>
!               All aspect models <rfc2119>MUST</rfc2119> include the following aspects:            
              </p>
  
!             <ulist>
!               <item><termref ref="term-location-aspect">location aspect</termref></item>
!               <item><termref ref="term-concept-aspect">concept aspect</termref></item>
!               <item><termref ref="term-entity-identifier-aspect">entity-identifier aspect</termref></item>
!               <item><termref ref="term-period-aspect">period aspect</termref></item>
!               <item><termref ref="term-unit-aspect">unit aspect</termref></item>
!             </ulist>
! 
!             <p>
!               All aspect models <rfc2119>MUST</rfc2119> also include sufficient additional aspects 
!               to ensure that any content in context segments and scenarios is also associated with 
!               an aspect.
!             </p>
  
!             <p>
!               The value of the <att>aspectModel</att> attribute on a
!               Variable-set resource specifies the aspect model to be
!               used when evaluating variables in the variable set defined
!               by the variable-set resource.
!               <definition id="term-variable-sets-aspect-model" term="variable set's aspect model ">
!                 A <term>variable set's aspect model</term> is the aspect model identified by
!                 the <att>aspectModel</att> attribute on the variable-set resource defining the 
!                 variable set.
!               </definition>
!             </p>
    
!             <p>
!               <definition id="term-dimensional-aspect-model" term="dimensional aspect model">
!                 The variable set of a variable-set resource with an <att>aspectModel</att> 
!                 attribute equal to <val>dimensional</val> has a <term>dimensional aspect model</term>.
!               </definition>
!               The dimensional aspect model 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>.              
!             </p>
! 
!             <p>
!               <definition id="term-non-dimensional-aspect-model" term="non-dimensional aspect model">
!                 The variable set of a variable-set resource with an <att>aspectModel</att> 
!                 attribute equal to <val>non-dimensional</val> has a <term>non-dimensional aspect model</term>.
!               </definition>
!               The non-dimensional aspect model 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>.
!             </p>
! 
!             <p>
!               <error id="error-unknown-aspect-model">
!                 Error code <errorcode code="unknownAspectModel"/> <rfc2119>MUST</rfc2119> be
!                 thrown if the processing software does not recognise the aspect model 
!                 identified by the value of the <att>aspectModel</att> attribute.
!               </error>
!             </p>
  
!           </section><!-- Aspect models -->
!         
!           <section id="sec-implicit-filters">
!             <head>Implicit filters</head>
!     
!             <p>
!               Fact variables in a variable set <rfc2119>MAY</rfc2119> be associated with 
!               <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>
!               as well as filters that are related to them explicitly by 
!               <termref ref="term-variable-filter-relationship">variable-filter relationships</termref> and
!               <termref ref="term-variable-set-filter-relationship">variable-set-filter relationships</termref>.
!             </p>
  
!             <p>
!               A variable set <rfc2119>MUST</rfc2119> have an <att>implicitFiltering</att> attribute that is
!               equal to <val>true</val> if its fact variables are to have 
!               <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>.  
!               If the <att>implicitFiltering</att> attribute is equal to <val>false</val> then 
!               the fact variables in the variable set are not associated with implicit filters.
!             </p>
!             
!             <p>
!               <definition id="term-uses-implicit-filtering" term="uses implicit filtering">
!                 A variable set <term>uses implicit filtering</term> if its 
!                 <att>implicitFiltering</att> attribute equals <val>true</val>
!                 and it does not use implicit filtering if the 
!                 <att>implicitFiltering</att> attribute equals <val>false</val>.
!               </definition>
!             </p>
  
!             <p>
!               The implicit filters, if any, that are associated with the fact variables
!               in a variable set depend on the variable set's aspect model.
!             </p>
!             
!             <p>
!               If a variable set has a dimensional aspect model, then the 
!               fact variable in the variable set are associated with
!               <xtermref bibref="IMPLICITFILTERS" 
!               idref="term-dimensional-implicit-filters">dimensional implicit filters</xtermref>.
!             </p>
  
!             <p>
!               If a variable set has a non-dimensional aspect model, then the 
!               fact variable in the variable set are associated with
!               <xtermref bibref="IMPLICITFILTERS" 
!               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 -->      
-           
-         </section><!-- Aspects -->
    
          <section id="sec-preconditions">
            <head>Preconditions</head>
--- 1303,1486 ----
            
          </section><!-- Variable-set relationships -->
  
!         <section id="sec-variable-set-filter-relationships">
!           <head>Variable-set-filter relationships</head>
!           
            <p>
!             <definition id="term-variable-set-filter-relationship" 
!             term="variable-set-filter relationship">
!               A <term>variable-set-filter relationship</term> 
!               is a relationship between a 
!               <termref ref="term-variable-set-resource">variable set resource</termref> and a 
!               <termref ref="term-filter">filter</termref> 
!               expressed by an <xtermref bibref="XLINK" idref="xlink-arcs">XLink arc</xtermref>.
!             </definition>
            </p>
!         
            <p>
!             To declare a variable-set-filter relationship an
!             XLink arc <rfc2119>MUST</rfc2119>:
            </p>
+           
+           <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>
+               have an XLink resource that defines a 
+               <termref ref="term-variable-set">variable set</termref>
+               at the 
+               <xtermref bibref="XLINK" idref="dt-starting-resource">starting resource of the arc</xtermref>
+             </item>
+             <item>
+               have a filter at the 
+               <xtermref bibref="XLINK" idref="dt-ending-resource">ending resource of the arc</xtermref>
+             </item>
+           </ulist>
  
            <p>
!             The arcrole value, 
!             <xmlref ref="variable-filter"><val>http://xbrl.org/arcrole/2008/variable-set-filter</val></xmlref>,
!             is declared in the normative schema supplied with this specification.
            </p>
  
            <p>
!             Variable-set-filter relationships <rfc2119>MUST</rfc2119>
!             be expressed by 
!             <termref ref="term-variable-set-filter-arc">variable-set filter arcs</termref>.
!             Violations of this requirement can be 
!             detected by validation against the XBRL Specification
!             <bibref ref="XBRL"/>. 
            </p>
  
            <p>
!             A filter participating in a variable-set-filter relationship is,
!             by definition, associated with each of the fact variables in variable
!             set defined by the resource that it is related to.
            </p>
!           
            <p>
!             <definition id="term-group-filter" term="group-filter">
!               A filter that is associated with a fact variable by a variable-set-filter relationship is
!               referred to as a <term>group filter</term>.
              </definition>
            </p>
!           
            <p>
!             <definition id="term-complemented-variable-set-filter-relationship" term="complemented variable-set-filter relationship">
!               A <term>complemented variable-set-filter relationship</term> is a variable-set-filter relationship
!               that is expressed by an arc with a <att>complement</att> attribute that has a value of <val>true</val>.
!             </definition>
            </p>
  
            <p>
!             The fact variables in a variable set defined by a resource with a complemented 
!             variable-set-filter relationship to a filter use the 
!             <termref ref="term-filter-complement">filter complement</termref> 
!             in their implied XPath expressions rather than the filter itself.
            </p>
  
            <p>
!             All filters that are associated with fact variables 
!             by variable-set-filter relationships, by definition,
!             do not cover any aspects.
            </p>
  
            <p>
!             Filters that are associated with fact variables by variable-set-filter relationships 
!             <rfc2119>MUST NOT</rfc2119> imply XPath expressions that include XPath variable references
!             to general variables or fact variables.
            </p>
  
            <p>
!             <error id="error-fact-variable-reference-not-allowed">
!               Error code <errorcode code="factVariableReferenceNotAllowed"/> <rfc2119>MUST</rfc2119> be thrown
!               if a filter that is associated with fact variables by a variable-set-filter relationship 
!               implies an XPath expression that includes an XPath variable reference to a general variable
!               or a fact variable.
!             </error>
            </p>
!           
!           <section id="sec-variable-set-filter-arc">
!             <head>Variable-set filter arcs</head>
!           
              <p>
!               <definition id="term-variable-set-filter-arc" term="variable-set filter arc">
!               A <term>variable-set filter arc</term> is expressed by the <elt>variable:variableSetFilterArc</elt>
!               element.</definition>
              </p>
  
              <p>
!               The syntax for the
!               <xmlref ref="xml-variable-set-filter-arc"><elt>variable:variableSetFilterArc</elt></xmlref>
!               element is defined by the normative schema supplied with this specification.
              </p>
  
!           </section><!-- Filter arcs -->
  
!         </section> <!-- variable-set-filter relationships -->
!       
!         <section id="sec-implicit-filters">
!           <head>Implicit filters</head>
    
!           <p>
!             Fact variables in a variable set <rfc2119>MAY</rfc2119> be associated with 
!             <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>,
!             defined in the Implicit filters specification <bibref ref="IMPLICITFILTERS"/>,
!             as well as filters that are related to them explicitly by 
!             <termref ref="term-variable-filter-relationship">variable-filter relationships</termref> and
!             <termref ref="term-variable-set-filter-relationship">variable-set-filter relationships</termref>.
!           </p>
  
!           <p>
!             A variable set <rfc2119>MUST</rfc2119> have an <att>implicitFiltering</att> attribute that is
!             equal to <val>true</val> if its fact variables are to have 
!             <xtermref bibref="IMPLICITFILTERS" idref="term-implicit-filter">implicit filters</xtermref>.  
!             If the <att>implicitFiltering</att> attribute is equal to <val>false</val> then 
!             the fact variables in the variable set are not associated with implicit filters.
!           </p>
!           
!           <p>
!             <definition id="term-uses-implicit-filtering" term="uses implicit filtering">
!               A variable set <term>uses implicit filtering</term> if its 
!               <att>implicitFiltering</att> attribute equals <val>true</val>
!               and it does not use implicit filtering if the 
!               <att>implicitFiltering</att> attribute equals <val>false</val>.
!             </definition>
!           </p>
  
!           <p>
!             The implicit filters, if any, that are associated with the fact variables
!             in a variable set depend on the variable set's aspect model.
!           </p>
!           
!           <p>
!             If a variable set has a dimensional aspect model, then the 
!             fact variable in the variable set are associated with
!             <xtermref bibref="IMPLICITFILTERS" 
!             idref="term-dimensional-implicit-filters">dimensional implicit filters</xtermref>.
!           </p>
  
!           <p>
!             If a variable set has a non-dimensional aspect model, then the 
!             fact variable in the variable set are associated with
!             <xtermref bibref="IMPLICITFILTERS" 
!             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 -->      
  
    
          <section id="sec-preconditions">
            <head>Preconditions</head>
***************
*** 1466,1473 ****
              Variable set resources <rfc2119>MAY</rfc2119> be associated with 
              preconditions by
              <termref ref="term-variable-set-precondition-relationship">variable-set-precondition relationships</termref>.
!             Preconditions are define conditions that must be satisfied
!             if for a 
              <termref ref="term-variable-set-evaluation">variable set evaluation</termref>
              to occur.
            </p>
--- 1489,1495 ----
              Variable set resources <rfc2119>MAY</rfc2119> be associated with 
              preconditions by
              <termref ref="term-variable-set-precondition-relationship">variable-set-precondition relationships</termref>.
!             Preconditions define conditions that must be satisfied for a 
              <termref ref="term-variable-set-evaluation">variable set evaluation</termref>
              to occur.
            </p>
***************
*** 1612,1627 ****
        <p>
          <definition id="term-variable-set-evaluation" 
          term="variable-set evaluation">
!           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 
            <termref ref="term-satisfied-precondition">satisfied</termref>
            given the evaluations of the variables in the variable set.
          </definition>
-         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.
        </p>
  
        <p>
          <definition id="term-identical-variable-set-evaluation" term="identical variable-set evaluation">
--- 1634,1664 ----
        <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 
            <termref ref="term-satisfied-precondition">satisfied</termref>
            given the evaluations of the variables in the variable set.
          </definition>
        </p>
+       
+       <p>
+         The special cases are:
+       </p>
+       
+       <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">
***************
*** 1646,1652 ****
            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 
--- 1683,1689 ----
            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 
***************
*** 1800,1813 ****
          <p>
            If the source sequence is empty, then the result
            of a fact variable evaluation also depends on the 
!           <att>bindEmpty</att> attribute and the <att>fallback</att>
!           attribute on the fact variable.
          </p>
  
          <p>
            <definition id="term-can-bind-to-an-empty-sequence" term="can bind to an empty sequence">
              A fact variable <term>can bind to an empty sequence</term> if it has a 
!             <att>bindEmpty</att> attribute with a value of <val>true</val>.
            </definition>
            Otherwise a fact variable cannot bind to an empty sequence and so, if the 
            source sequence is empty, the fact variable cannot be evaluated.
--- 1837,1849 ----
          <p>
            If the source sequence is empty, then the result
            of a fact variable evaluation also depends on the 
!           <att>fallbackValue</att> attribute on the fact variable.
          </p>
  
          <p>
            <definition id="term-can-bind-to-an-empty-sequence" term="can bind to an empty sequence">
              A fact variable <term>can bind to an empty sequence</term> if it has a 
!             <att>fallbackValue</att> attribute.
            </definition>
            Otherwise a fact variable cannot bind to an empty sequence and so, if the 
            source sequence is empty, the fact variable cannot be evaluated.
***************
*** 1815,1847 ****
  
          <p>
            If a fact variable can bind to an empty sequence, and the source sequence 
!           is empty, then the result of variable evaluation depends upon whether
!           the fact variable includes a <att>fallbackValue</att> attribute.
!         </p>
! 
!         <p>
!           If a fact variable does not include a <att>fallbackValue</att> attribute 
!           then the result of the fact variable evaluation is the empty sequence.
!           However, if a fact variable does include a <att>fallbackValue</att> attribute,
!           then 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>
            <definition id="term-fallback-value" term="fallback value">
!             A <term>fallback value</term> is the value of a fact variable whose value has been 
              determined on the basis of the content of the <att>fallbackValue</att> attribute.
            </definition>
          </p>
  
-         <p>
-           If a variable set contains fact variables but all of the fact variables in it 
-           evaluate to empty sequences or to fallback values, then the variable set is
-           not deemed to have been evaluated.
-         </p>
- 
        </section>
  
      </section>
--- 1851,1871 ----
  
          <p>
            If a fact variable can bind to an empty sequence, and the source sequence 
!           is empty, then the result of variable evaluation is determined by the 
!           <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>
            <definition id="term-fallback-value" term="fallback value">
!             A <term>fallback value</term> is the value of a fact variable that has been 
              determined on the basis of the content of the <att>fallbackValue</att> attribute.
            </definition>
          </p>
  
        </section>
  
      </section>
***************
*** 1873,1878 ****
--- 1897,1903 ----
            <includeChunk ref="boilerplate/references/XMLNAMES.xml"/>
            <includeChunk ref="boilerplate/references/XMLSCHEMA-STRUCTURES.xml"/>
            <includeChunk ref="boilerplate/references/XPATH2.xml"/>
+           <includeChunk ref="boilerplate/references/XQUERY.xml"/>
            <includeChunk ref="boilerplate/references/XFUNCTIONS.xml"/>        
            <includeChunk ref="boilerplate/references/XLINK.xml"/>
            <includeChunk ref="boilerplate/references/XSLT2.xml"/>
***************
*** 2405,2411 ****
              Public Working Draft without the unintended consequences.
            </p>
            <p>
!             From feedback by <personref ref="pablo"/>: 
              fixed up the erroneous reference to a <elt>formula:parameter</elt> instead
              of a <elt>variable:parameter</elt>; and
              fixed up the grammatical error "the how the" in the section on aspect models.
--- 2430,2436 ----
              Public Working Draft without the unintended consequences.
            </p>
            <p>
!             From feedback by <personref ref="person-pablo"/>: 
              fixed up the erroneous reference to a <elt>formula:parameter</elt> instead
              of a <elt>variable:parameter</elt>; and
              fixed up the grammatical error "the how the" in the section on aspect models.
***************
*** 2476,2481 ****
--- 2501,2625 ----
            </p>
          </revision>
  
+         <revision ref="person-geoff" day="16" month="02" year="2008">
+           <p>
+             Added a missing reference for XQuery.
+           </p>
+           <p>
+             Corrected reference to Pablo in the revision history.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="26" month="02" year="2008">
+           <p>
+             Removed the erroneous <code>or</code> from the end of the unit aspect test.
+             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>
+ 
+         <revision ref="person-geoff" day="07" month="03" year="2008">
+           <p>
+             Defined a default function namespace.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" day="08" month="03" year="2008">
+           <p>
+             Changed any to all to improve the clarity of the requirement
+             that aspect models include aspects for whatever content is
+             permitted in segments and scenarios.
+           </p>
+           <p>
+             Added a table summarising the aspects in the dimensional and
+             non-dimensional aspect models.
+           </p>
+           <p>
+             Eliminated the redundant <att>bindEmpty</att> attribute and simplified
+             the specification explanation for how fact variables evaluate when
+             their source sequences are empty.
+           </p>
+           <p>
+             Fixed grammatical errors in the definition of a precondition.
+           </p>
+           <p>
+             These changes were suggested by <personref ref="person-paul"/>.
+           </p>
+         </revision>        
+         
+         <revision ref="person-geoff" day="10" month="03" year="2008">
+           <p>
+             Grouped the various paragraphs contributing to the definition of a variable
+             set evaluation so that the complete definition is available in a single place
+             rather than having to be pieced together from different sections of the 
+             specification.
+           </p>
+           <p>
+             Clarified the reference to XSLT 2.0 sequence constructors as suggested
+             by <personref ref="person-phillip"/>.
+           </p>
+         </revision>
+         
+         <revision ref="person-geoff" 
+         day="13" month="03" year="2008">
+           <p>
+             Created links from terms used in the introduction. 
+           </p>
+           <p>
+             Added explanation of the function of parameters to the parameter definition. 
+           </p>
+           <p>
+             Clarified motivation for XBRL custom functions by referencing the need to 
+             draw on information from the DTS supporting XBRL instances.
+           </p>
+           <p>
+             Flagged that the implementation of custom functions is outside the scope
+             of the variable specification.
+           </p>
+           <p>
+             Changed the reference to a formula processor to a reference
+             to a variable processor.
+           </p>
+           <p>
+             Clarified the wording in relation to sourcing of values for mandatory and
+             non-mandatory parameters.
+           </p>
+           <p>
+             Rearranged sections to minimise references to terms not already defined.
+           </p>
+           <p>
+             Simplified the definitions of the dimensional and
+             non-dimensional aspect models to avoid relying on references to the 
+             <att>aspectModel</att> attribute on variable sets.
+           </p>
+           <p>
+             Defined the unique text string identifier for an aspect model. 
+           </p>
+           <p>
+             Clarified that aspect tests are equivalence relations.
+           </p>
+           <p>
+             Relaxed the requirement on the aspects that had to be
+             included in all aspect models.
+           </p>
+           <p>
+             Added an explicit reference to the implicit filtering specification. 
+           </p>
+           <p>
+             These changes were in response to feedback by CompSci Resources.
+           </p>
+         </revision>
+ 
+         <revision ref="person-geoff" day="20" month="03" year="2008">
+           <p>
+             Fixed broken hyperlinks.
+           </p>
+         </revision>
+         
        </revisions>
  
      </section>
