<?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>1667</bug_id>
          
          <creation_ts>2005-07-16 23:48:08 +0000</creation_ts>
          <short_desc>[FS] editorial: 4.8.1 FLWOR expressions</short_desc>
          <delta_ts>2007-01-16 17:32:58 +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>4751</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-16 23:48:08 +0000</bug_when>
    <thetext>4.8.1 FLWOR expressions

Notation

&quot;[[ FLWORClause ]]_FLWOR (Expr)&quot;
    As with
        FunctionArgument(SequenceType),
        AtomizeAtomic(SequenceType), and
        Convert(SequenceType),
    the &quot;(Expr)&quot; should be in subscript, otherwise it looks like the
    result of [[]]_FLWOR is a function name that is then applied to
    argument Expr.
    (But see the related technical comment.)

&quot;The OrderByClause is discussed in [4.8.4 Order By and Return Clauses].&quot;
    This would make more sense after Norm / rule 6, where we would expect
    to find the rule for normalizing OrderByClause.

Notation
    I don&apos;t think you need two Notation sections, especially since they&apos;re
    talking about the same thing. Delete the second &quot;Notation&quot;.

Norm

&quot;nested core expressions&quot;
    s/core/Core/

Norm / rule (2|3)
    If, for brevity, we let
        FLWOClause ::= ForClause | LetClause | WhereClause | OrderByClause
    then these two rules assume that XQuery FLWORExprs are defined by:
        FLWORExpr ::= FLWOClause FLWORExpr | FLWOClause &quot;return&quot; Expr
    which is quite different from the EBNF given in 4.8. It would be good
    if you acknowledged that the first step in normalizing FLWORExprs is
    to restructure them from the 4.8 syntax to this right-recursive syntax.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4753</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-17 00:09:17 +0000</bug_when>
    <thetext>(also...)

&quot;The following simple example illustrates, how&quot;
    Delete comma.

&quot;It uses a let clause to binds&quot;
    s/binds/bind/

&quot;This core expression&quot;
    s/core/Core/
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9273</commentid>
    <comment_count>2</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-04-17 00:22:28 +0000</bug_when>
    <thetext>Fixed as suggested, except for #2 to preserve alignment with the XQuery 1.0 specification.
- Jerome
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9276</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-04-17 02:31:26 +0000</bug_when>
    <thetext>Re #2, I was only suggesting that the quoted sentence be moved to after Norm / rule 6 (not that the content of 4.8.4 be moved there). Would that break alignment with the XQuery spec?

Since you bring up alignment, the XQuery spec has
    3.8 FLWOR Expressions
        3.8.1 For and Let Clauses
        3.8.2 Where Clause
        3.8.3 Order By and Return Clauses
        3.8.4 Example
whereas the FS has
    4.8 [For/FLWOR] Expressions
        4.8.1 FLWOR expressions
        4.8.2 For expression
        4.8.3 Let Expression
        4.8.4 Order By and Return Clauses
so they don&apos;t seem that well aligned. To be more aligned, you could take Norm / rule (4|5|6) and put each in its appropriate section (creating a section for Where), and then move the subsequent examples to a new Example section. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>