<?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>1694</bug_id>
          
          <creation_ts>2005-07-17 22:36:31 +0000</creation_ts>
          <short_desc>[FS] editorial: 5 Modules and Prologs</short_desc>
          <delta_ts>2007-09-29 20:53:19 +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>Formal Semantics 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Jerome Simeon">simeon</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>4780</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-17 22:36:31 +0000</bug_when>
    <thetext>5 Modules and Prologs

Core Grammar
[1 (Core)] Module ::= ...
[3 (Core)] MainModule ::= ...
[4 (Core)] LibraryModule ::= ...
[6 (Core)] Prolog ::= ...
[7 (Core)] Setter ::= ...
[8 (Core)] Import ::= ...
[29 (Core)] QueryBody ::= ...
    These productions are never used. Might as well delete them.

Notation

&quot;In the Formal Semantics, it is simpler to assume the declarations can
appear in any order,&quot;
    Yes, but then there&apos;s the question of how an XQuery Prolog is
    restructured into a Formal PrologDeclList.

[80 (Formal)] PrologDeclList ::= ...
    The inference rules assume a right-recursive syntax, e.g.:
       PrologDeclList ::= | PrologDecl Separator PrologDeclList
    or
       PrologDeclList ::= ( PrologDecl Separator PrologDeclList )?

Norm
    There&apos;s no text in the &quot;Normalization&quot; section. Delete header?
    Or is it meant to be a co-header with &quot;Static Context Processing&quot;?
    If so, it could be clearer.

SCP

SCP / rule 1 / conclusion
&quot;statEnv |- () =&gt;stat statEnv with ()&quot;
DCP / rule 1 / conclusion
&quot;dynEnv |- () =&gt;dyn dynEnv&quot;
    These use &apos;()&apos; to stand in for an empty PrologDeclList. This is not a
    good idea, since there&apos;s possible confusion with &apos;()&apos; denoting the
    empty sequence in the XQuery/Core syntax.

Notation 2

&quot;under the static environment statEnv1&quot;
&quot;the static environment statEnv2&quot;
    s/static/dynamic/
    s/statEnv/dynEnv/

&quot;and the normalized sequence of prolog declarations in the Core grammar.&quot;
    Delete.

DCP

&quot;The first rule specifies for an empty sequence&quot;
    Insert &quot;that&quot; after &quot;specifies&quot;

&quot;the initial dynamic environment is the default dynamic context.&quot;
    No, it doesn&apos;t say that. (Typically, when this rule holds, dynEnv will
    *not* be dynEnvDefault.)

DEv / rule 1 / premise 2
&quot;dynEnv |- [[ QueryBody ]]_Expr Expr2&quot;
    Insert &quot;==&quot; before &quot;Expr2&quot;.

    And s/dynEnv/statEnv/

    But then (it becomes clearer that) you need to show where statEnv
    comes from. Presumably you need to repeat
      statEnvDefault |- PrologDeclList =&gt;stat statEnv with PrologDeclList1
    from STA / rule 1.

SCP / rule 2 / premise 1
STA / rule 1 / premise 2
DEv / rule 1 / premise 2
    Change &quot;==&quot; to &quot;=&quot;, see Bug 1548.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9286</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-04-18 03:19:36 +0000</bug_when>
    <thetext>Fixed as suggested, including the removal of unused grammar productions from the XQuery core.
- Jerome
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12268</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-10-04 08:45:52 +0000</bug_when>
    <thetext>I said:
&gt;
&gt; DEv / rule 1 / premise 2
&gt;     Presumably you need to repeat
&gt;       statEnvDefault |- PrologDeclList =&gt;stat statEnv with PrologDeclList1
&gt;     from STA / rule 1.
And you did, except you&apos;re missing the &apos;with PrologDeclList1&apos; part.

Also, this hasn&apos;t been done:
&gt; SCP / rule 2 / premise 1
&gt; STA / rule 1 / premise 2
&gt; DEv / rule 1 / premise 2
&gt;     Change &quot;==&quot; to &quot;=&quot;, see Bug 1548.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12287</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-10-04 22:25:45 +0000</bug_when>
    <thetext>Further to DEv / rule 1:
    In premise 2, remove the subscript &apos;1&apos; from statEnv1, so it unifies with the
    statEnv in premise 3.

    In premise 1, add a subscript &apos;1&apos; to PrologDeclList, so it unifies with the
    PrologDeclList1 that will be in premise 2 (because =&gt;dyn operates on a
    normalized PrologDeclList).

    And it&apos;ll make more sense if you move premise 1 down a couple lines to
    become premise 3. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16878</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2007-09-29 20:52:53 +0000</bug_when>
    <thetext>The unresolved portions of this issue (listed in Comment #2 and Comment #3) have been entered as FS erratum E007. A fix (incorporating all the given suggestions) has been committed to the source files for the next edition of the FS document.
Consequently, I&apos;m marking this issue resolved-FIXED, and CLOSED.
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>