<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5413</bug_id>
          
          <creation_ts>2008-01-24 01:56:02 +0000</creation_ts>
          <short_desc>[XQuery] C.2: &quot;scope&quot; of &apos;function implementations&apos; component</short_desc>
          <delta_ts>2008-04-16 00:33:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 1.0</component>
          <version>Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Don Chamberlin">chamberl</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>18496</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2008-01-24 01:56:02 +0000</bug_when>
    <thetext>C.2 Dynamic Context Components

On the row for the &quot;Function implementations&quot; component, the Scope is given as &quot;global&quot;. This should be &quot;module&quot;.

Note that that component is required to be consistent with the function signatures component of the static context, whose Scope is given as &quot;module&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19525</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-03-18 11:00:59 +0000</bug_when>
    <thetext>There are only two values defined for the &quot;scope&quot; of a component in the dynamic context: &quot;global&quot; and &quot;dynamic&quot;. They are defined like this:

Scope: Indicates where the component is applicable. &quot;Global&quot; indicates that the component applies globally, throughout all the modules used in a query, and remains constant during evaluation of a query. &quot;Dynamic&quot; indicates that evalation of an expression may influence the value of the component for that expression and for nested expressions.

The function implementations component is constant during the evaluation of a query, so I think that under these definitions it is global.

But &quot;Fixed&quot; would be a better term.

Actually, I see very little point in modelling &quot;function implementations&quot; as part of the dynamic context. In fact, I think it&apos;s positively misleading: I think most processors are likely to take advantage of the fact that function implementations are known at compile time, or at the very latest at link time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19706</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2008-04-02 02:33:02 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; There are only two values defined for the &quot;scope&quot; of a component in the
&gt; dynamic context: &quot;global&quot; and &quot;dynamic&quot;.

Hm, so it is. (However, note that according to 2.1.2, the dynamic context
contains all the components of the static context, so it&apos;s somewhat unclear
what happens to those components when they have &quot;module&quot; or &quot;lexical&quot; scope.)

&gt; They are defined like this:
&gt; 
&gt; Scope: Indicates where the component is applicable. &quot;Global&quot; indicates that
&gt; the component applies globally, throughout all the modules used in a query,
&gt; and remains constant during evaluation of a query.

I find this definition unsatisfying.  The wording, in which a context
component &quot;applies&quot; (or &quot;is applicable&quot;) somewhere, isn&apos;t really explained.
(As far as I can tell, it isn&apos;t used anywhere else in the spec.)

(Moreover, in language specs, &quot;scope&quot; usually has to do with the visibility of
declared identifiers (e.g., &quot;in-scope variables&quot;), which isn&apos;t the case here.)

&gt; &quot;Dynamic&quot; indicates that evalation of an expression may influence the
&gt; value of the component for that expression and for nested expressions.

(Just noticed the typo: &quot;evalation&quot; for &quot;evaluation&quot;.)

&gt; The function implementations component is constant during the evaluation of
&gt; a query, so I think that under these definitions it is global.
&gt; 
&gt; But &quot;Fixed&quot; would be a better term.

That might convey the intent better, except that putting it under the heading
of &quot;Scope&quot; (suggesting &quot;fixed scope&quot; or &quot;scope is fixed&quot;) would probably give
the wrong impression.

&gt; Actually, I see very little point in modelling &quot;function implementations&quot; as
&gt; part of the dynamic context. In fact, I think it&apos;s positively misleading: I
&gt; think most processors are likely to take advantage of the fact that function
&gt; implementations are known at compile time, or at the very latest at link
&gt; time.

I&apos;m inclined to agree. I don&apos;t think moving &quot;function implementations&quot; to the
static context would have any ill effects.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19824</commentid>
    <comment_count>3</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2008-04-15 21:33:08 +0000</bug_when>
    <thetext>Michael,
The Query Working Group considered this bug report on 15 April 2008. The working group agrees that &quot;fixed&quot; or &quot;static&quot; would be a more descriptive term for the scope of a function implementation than the current term &quot;global.&quot; However, the consensus of the working group was that this issue does not rise to the level of an error that needs to be corrected by publishing an erratum at this time. 

In a future version of the XQuery specification, we will consider revising the scope categories for dynamic context components.

If you are satisfied with this resolution, please mark this bug report as Closed.
Regards,
Don Chamberlin (for the query working group)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>