This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
3.12.5 Constructor Functions "The semantics of the constructor function T($arg) are defined to be equivalent to the expression ($arg cast as T?)." Please clarify whether this is talking about the semantics of the function or the semantics of a *call* to the function. If the former, then a call to the function has the usual call-related semantics (including the function conversion rules of section 3.1.5). If the latter, the equivalence bypasses the usual call-related semantics. (Mind you, I haven't found a case where the two interpretations lead to different outcomes.)
Dear Michael, The XSLT and XML Query working groups have reviewed your comment and believe that the definition of constructor functions should be clear: << [Definition: The constructor function for a given type is used to convert instances of other atomic types into the given type. The semantics of the constructor function T($arg) are defined to be equivalent to the expression ($arg cast as T?).] >> The working groups believed that the use of the term 'equivalence' in the second sentence of the definition shouldn't leave much room for misunderstanding. As a results the working groups have decided to close your comment with no action. Best regards, - Jerome Simeon, on behalf of the XSLT and XML Query working groups
I'm not satisfied by that response, as it does not address the particulars of my original comment -- specifically, the distinction between a function and a function call. From your response, I still have no idea which you actually intend. > The working groups believed that the use of the term 'equivalence' in the > second sentence of the definition shouldn't leave much room for > misunderstanding. I strongly disagree. Sure, there's no misunderstanding that you're defining an equivalence (and I never questioned that), but there's certainly still room for misunderstanding about the things being defined as equivalent. ---- Let me try a different tack. Do you think the definition would mean the same thing if it said "the semantics of a call to the constructor function ..." ? If you do, then consider this a request to make that change. If you don't think it would mean the same thing, then perhaps you understand the distinction I was making in the original post.
Michael, On June 13, 2006, the Query and XSLT working groups reconsidered this reopened comment and agreed to make the following change in Section 3.12.5 (Constructor Functions) in the next version of the XQuery specification: "The semantics of the constructor function T($arg) are defined ..." will be changed to "The semantics of the expression T($arg) are defined ..." The working groups believe that this change addresses your issue, and accordingly I have marked this comment as Fixed and Closed. Of course, you may reopen the comment if you are not satisfied with this resolution. Regards, Don Chamberlin (for the Query and XSLT working groups)
(In reply to comment #3) > > "The semantics of the expression T($arg) are defined ..." > > The working groups believe that this change addresses your issue, Yup, thanks. However, since you don't want to restrict the equivalence to expressions in which the argument is a variable reference, I suggest you change '$arg' to 'ExprSingle'. And put parentheses around the argument in the cast expression, since it isn't necessarily a UnaryExpr.