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 3183 - [FS] editorial: 4.1.5 Function Calls: []_FunctionArgument
Summary: [FS] editorial: 4.1.5 Function Calls: []_FunctionArgument
Status: ASSIGNED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-03 18:41 UTC by Michael Dyck
Modified: 2007-11-04 06:00 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2006-05-03 18:41:21 UTC
4.1.5 Function Calls

Notation
[]_FunctionArgument
    First, picking up on Bug 1576 comment #2, note that the conditional
    structures of []_AtomizeAtomic and []_Convert are now identical,
    so the two can be merged (into []_ConvertAtomic, say):

        [ Expr ]_ConvertAtomic(SequenceType) denotes
        fs:convert-simple-operand(fn:data(Expr),PrototypicalValue)
            If [SequenceType]_sequencetype <: xdt:anyAtomicType*
        Expr
            Otherwise

    Second, note that, as seen at the end of Bug 1680 comment #4,
    []_FunctionArgument() is actually invoked with a Type, not a
    SequenceType (because when you look up the function name/arity in
    statEnv.funcType, you get a signature with Types, not SequenceTypes).
    This modifies the above definition to:

        [ Expr ]_ConvertAtomic(Type) denotes
        fs:convert-simple-operand(fn:data(Expr),PrototypicalValue)
            If Type <: xdt:anyAtomicType*
        Expr
            Otherwise

    Finally, I suggest that rather than using this ad hoc If/Otherwise
    notation, the whole []_FunctionArgument() mapping would be better
    expressed as two inference rules:

        statEnv |- Type <: xdt:anyAtomicType*
        -------------------------------------
        statEnv |- [ Expr ]_FunctionArgument(Type) =
            fs:convert-simple-operand(fn:data( [Expr]_Expr ),ProtoValue)

        statEnv |- not( Type <: xdt:anyAtomicType* )
        --------------------------------------------
        statEnv |- [ Expr ]_FunctionArgument(Type) = [Expr]_Expr
Comment 1 Jim Melton 2007-02-26 00:11:11 UTC
The fix for this bug does not appear in the Recommendation of 23 January 2007. 
It will be considered for a future publication (either an Errata document or
some possible future version of the specification).