- From: Michael Kay <mhk@mhk.me.uk>
- Date: Wed, 10 Mar 2004 23:21:00 -0000
- To: "'Ashok Malhotra'" <ashokma@microsoft.com>, <public-qt-comments@w3.org>
The trouble about the cited paragraph is that it's not clear whether it is saying that the semantics are identical by definition, or whether it is just mentioning in passing that although the two constructs are defined separately, they give you the same answer. For example, the rules for constructors say that the whitespace facet is taken into account, but the rules for casting don't say this. So the semantics of the two cases appear to be different, despite the assertion that they are the same. It would be much better if the section on constructors said nothing about the semantics other than to define an equivalence to a cast, and then to move all the semantics into the casting section. It would also be much clearer if these two sections were closer together in the document. However, I accept that these are ultimately editorial points. Michael Kay # -----Original Message----- # From: Ashok Malhotra [mailto:ashokma@microsoft.com] # Sent: 10 March 2004 21:52 # To: Michael Kay; public-qt-comments@w3.org # Subject: RE: [F+O] Relationship of casts and constructors # # Mike: # Thank you for your comment. The WGs discussed this last week and agreed # that the wording could be improved. I've unified the errors into one # "invalid value for cast/constructor". I'm not crazy about the phrase # and am happy to consider an alternate wording. # # I've also improved the wording some. # # The fifth para of the constructor section is copied below. I think this # makes it clear that the semantics are identical. We could make this # para more prominent if you think that would help. # # "The semantics of the constructor function "xs:TYPE(arg)" are identical # to the semantics of "arg cast as xs:TYPE". See 17 Casting. In some # cases, the semantics of casting are explained using constructor # functions; but there is no circularity. The constructors used in these # explanations invariably take xs:string arguments and, in this case, the # semantics are the semantics of XML Schema validation as discussed # above." # # All the best, Ashok # # -----Original Message----- # From: public-qt-comments-request@w3.org # [mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Kay # Sent: Sunday, February 08, 2004 3:13 PM # To: public-qt-comments@w3.org # Subject: [F+O] Relationship of casts and constructors # # # F+O still describes casts and constructor functions in separate # sections: it is not clear that they are completely synonymous with each # other. # # For example, it appears that you will get different errors depending on # whether you use a cast or a constructor function. # # Constructors should be defined entirely in terms of casts, or vice # versa. If the two cases generate different error codes, implementations # can't treat them as being purely different surface syntax for the same # operation. # # Note also my separate comment that the XPath language spec defines error # codes for casting which conflict with the codes defined in F+O. # # Michael Kay #
Received on Wednesday, 10 March 2004 18:21:03 UTC