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 29382 - [XP31] semantics of an 'empty' FunctionBody
Summary: [XP31] semantics of an 'empty' FunctionBody
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2016-01-19 17:26 UTC by Michael Dyck
Modified: 2016-01-26 17:32 UTC (History)
1 user (show)

See Also:


Description Michael Dyck 2016-01-19 17:26:10 UTC
In XQuery 3.1 & XPath 3.1, an InlineFunctionExpr has a FunctionBody, which is an EnclosedExpr, which can be just "{ }".

In XQuery, the semantics of this are addressed:
    [Definition: In an enclosed expression, the optional expression enclosed
    in curly braces is called the content expression.] If the content
    expression is omitted, the value of the content expression is ().

However, these  sentences occur in 3.9 Node Constructors, which does not exist in the XPath spec, and so the semantics are not defined in the XPath spec.

(Moreover, in the XQuery spec, it's odd that those sentences are in 3.9 Node Constructors, since EnclosedExprs are not specific to node constructors.)
Comment 1 Andrew Coleman 2016-01-26 17:32:24 UTC
The WG agreed to make the change suggested here