<?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>1668</bug_id>
          
          <creation_ts>2005-07-16 23:52:42 +0000</creation_ts>
          <short_desc>[FS] technical: 4.8.1 FLWOR expressions: non-parameterized normalization</short_desc>
          <delta_ts>2007-02-25 23:15:44 +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>4752</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-16 23:52:42 +0000</bug_when>
    <thetext>4.8.1 FLWOR expressions

Norm
[[ FLWORClause ]]_FLWOR(Expr)

I don&apos;t understand why you&apos;re using a parameterized []-form. I can see how
you might need it if you were normalizing the 4.8 syntax, but since you&apos;re
assuming an easier syntax, the parameter shouldn&apos;t be necessary.

If we define
    FLWORExpr_or_return ::= FLWORExpr | &quot;return&quot; Expr
(find a better name if you like) then we can express the assumed EBNF as:
    FLWORExpr ::= (ForClause | LetClause | WhereClause | OrderByClause)
                  FLWORExpr_or_return
Then you can:
(a) drop Norm / rule (2|3)

(b) recast rule (4|5|6) (and 4.8.4 / Norm / rule 1) as non-parameterized
    rules:

    rule 4:
        [[ &lt;one many-variable ForClause&gt; FLWORExpr_or_return ]]_Expr
        ==
        &lt;many single-var Forclauses&gt; return [[ FLWORExpr_or_return ]]_Expr

    rule 5:
        (very similar)

    rule 6:
        [[ where Expr FLWORExpr_or_return ]]_Expr
        ==
        if ( [[ Expr ]]_Expr ) then [[ FLWORExpr_or_return ]]_Expr else ()

    4.8.4 / Norm / rule 1:
        [[ stable? order by OrderSpecList FLWORExpr_or_return ]]_Expr
        ==
        [[ OrderSpecList ]]_OrderSpecList return [[ FLWORExpr_or_return ]]_Expr

(c) provide a &quot;base case&quot; rule:
        [[ return Expr ]]_Expr
        ==
        [[ Expr ]]_Expr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5081</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-21 18:33:02 +0000</bug_when>
    <thetext>This proposed change looks editorial to me. It looks like a valuable
simplification to the existing rules.
- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5183</commentid>
    <comment_count>2</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-22 22:59:49 +0000</bug_when>
    <thetext>The WGs have decided to reclassify that comment as editorial. The specific
solution is left to the discretion of the editors, considering the solution
proposed by the commenter.

- Jerome Simeon
On behalf of the XML Query and XSL WGs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9294</commentid>
    <comment_count>3</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-04-18 15:03:17 +0000</bug_when>
    <thetext>Fixed as suggested. This is a great simplification for that part of the spec.
- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12257</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-10-03 20:05:42 +0000</bug_when>
    <thetext>The 2006-06 CR has a few errors relative to my suggestion:

In Norm / rule (1|2), *above* the &apos;==&apos;,
    [[ FormalReturnClause ]]_Expr
should be just
    FormalReturnClause

In Norm / rule 1, below the &apos;==&apos;, after
    [[ Exprn ]]_Expr
insert &quot;return&quot;.

In Norm / rule 2, below the &apos;==&apos;, in
    return Expr [[ FormalReturnClause ]]_Expr
delete the first &apos;Expr&apos;.

Also:

You replaced my suggested symbol name &apos;FLWORExpr_or_return&apos; with &apos;FormalReturnClause&apos;, which I don&apos;t think is an improvement. It would be a good name for the
    &quot;return&quot; Expr
phrase (if that needed a name), so isn&apos;t that great for the more general
    FormalFLWORExpr | (&quot;return&quot; Expr)
How about &apos;FormalInnerFLWORExpr&apos; or &apos;FormalFLWORExprInner&apos;?


In [66 (Formal)] and throughout 4.8.*, each &apos;Expr&apos; should really be an &apos;ExprSingle&apos; (not including &apos;Expr&apos; in []_Expr subscripts).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13596</commentid>
    <comment_count>5</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-01-16 17:57:42 +0000</bug_when>
    <thetext>Corrected the errors, but left the grammar and non-terminals
unchanged.

- Jerome
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>