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 14237 - [XPath30] editorial: 3.2.2: "PrimaryExpr"
Summary: [XPath30] editorial: 3.2.2: "PrimaryExpr"
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.0 (show other bugs)
Version: Working drafts
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 07:30 UTC by Michael Dyck
Modified: 2011-12-11 19:40 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2011-09-22 07:30:49 UTC
XPath30 and XQuery30 section 3.2.2 "Dynamic Function Invocation" say:

    [Definition: A dynamic function invocation consists of a PrimaryExpr
    that returns the function item and a parenthesized list of zero or
    more arguments (argument expressions or ArgumentPlaceholders).]

    If the PrimaryExpr does not return a sequence consisting of a single
    function item with the same arity as the number of specified arguments,
    a type error is raised [err:XPTY0004].

These two occurrences of "PrimaryExpr" are problematic. Consider the section's second example:
    $f[2]("Hi there")
The function item that is invoked is returned by $f[2], which is not a PrimaryExpr. The PrimaryExpr is $f, which does not return a sequence consisting of a single function item.

I suggest we change "PrimaryExpr" to "base expression", in parallel with 3.2.1 "Filter Expressions".
Comment 1 Jonathan Robie 2011-12-11 19:40:40 UTC
I believe this is fixed in the current internal Working Draft.