This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1667 - [FS] editorial: 4.8.1 FLWOR expressions
Summary: [FS] editorial: 4.8.1 FLWOR expressions
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-16 23:48 UTC by Michael Dyck
Modified: 2007-01-16 17:32 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-07-16 23:48:08 UTC
4.8.1 FLWOR expressions

Notation

"[[ FLWORClause ]]_FLWOR (Expr)"
    As with
        FunctionArgument(SequenceType),
        AtomizeAtomic(SequenceType), and
        Convert(SequenceType),
    the "(Expr)" 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.)

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

Notation
    I don't think you need two Notation sections, especially since they're
    talking about the same thing. Delete the second "Notation".

Norm

"nested core expressions"
    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 "return" 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.
Comment 1 Michael Dyck 2005-07-17 00:09:17 UTC
(also...)

"The following simple example illustrates, how"
    Delete comma.

"It uses a let clause to binds"
    s/binds/bind/

"This core expression"
    s/core/Core/
Comment 2 Jerome Simeon 2006-04-17 00:22:28 UTC
Fixed as suggested, except for #2 to preserve alignment with the XQuery 1.0 specification.
- Jerome
Comment 3 Michael Dyck 2006-04-17 02:31:26 UTC
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'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.