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 1741 - [FS] editorial: 5.15 Function Declaration
Summary: [FS] editorial: 5.15 Function Declaration
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-18 23:46 UTC by Michael Dyck
Modified: 2007-01-16 17:40 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-07-18 23:46:50 UTC
5.15 Function Declaration

Notation
"Parameters without a declared typed"
    s/typed/type/

Norm / rule (1|2|3|4)
"[[ ParamList? ]]_Param"
    According to the Notation section, []_Param only applies to an
    individual parameter, not the whole list.

Norm / rule (1|2)
"[[ EnclosedExpr ]]_Expr"
    The []_Expr form isn't defined on EnclosedExprs.
    Rewrite "EnclosedExpr" as "{ Expr }", and put []_Expr around "Expr".

5.15 / Norm / rule (2|4)
(return type is not provided)
    For these two rules, it might be simpler for the RHS to be a recursive
    call to []_PrologDecl on a FunctionDecl with the "as item*" inserted.
    Then only rules 1 and 3 have to be concerned with the detailed
    normalization.

Norm / rule 4
"[[ QName ]]"
    Delete square brackets.

5.15 / SCP / para 1
"Because functions are mutually referential"
    s/are/can be/

"This rules also updates"
    s/also/therefore/   (or just delete "also")

STA
"The static typing rules for function bodies follows normalization ..."
    s/follows/follow/

"The typing rules below constructs a new environment"
    s/rules/rule/

"in which each variable has the given expected type"
    s/variable/parameter/

"the local functions component of the static context"
    s/local functions/function signatures/
    (funcType isn't just local functions)

"If type checking fails, a static error is raised."
    s/static/type/, I think. (err:XPTY0004)

DCP / rule 2 / conclusion
"Variable1 as SequenceType1"
"Variablen as SequenceTypen"
    You probably want to change 'Variable' to 'VarRef'.
(leftover from last year, comment #182)

"when the function is called and is described in ..."
    s/and is/, as/
Comment 1 Jerome Simeon 2006-04-13 18:49:55 UTC
Fixed as suggested.
- Jerome