This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
(1) I think there should be a rule that the annotations on a variable or function should have distinct names. Without such a rule, annotion assertions don't seem to make much sense. We don't seem to have such a rule at the moment. (2) Quote: It is a static error [err:XQST0116] if a variable declaration's's annotations contain more than one annotation named %private or %public. Three problems here. (a) the doubled "'s" (b) the sentence is ambiguous, it doesn't really state clearly that you can't have one annotation named %private and another named %public. (c) there is no corresponding error for function annotations. If we fix (1) above then we can write this as It is a static error [err:XQST0116] if the set of annotations on a function declaration or variable declaration inlcudes both a %public and a %private annotation.
With respect to (c), I think there is a corresponding error in section 4.18: "It is a static error [err:XQST0106] if a function's annotations contain more than one annotation named ""http://www.w3.org/2005/xpath-functions"":private or ""http://www.w3.org/2005/xpath-functions"":public."
With respect to (1), I disagree. It's perfectly acceptable to have more than one annotation with the same name - what that means is defined by the implementation that understands the annotation. For instance, it seems perfectly reasonable for a given function to be made available at two different URLs using the (hypothetical) %rest:url annotation. With respect to (2c), there is no annotation assertion error because %public and %private are not valid as a annotation assertions.
As Mary pointed out today, it may make sense to have two annotations with the same name and different parameters.
(In reply to comment #0) > (1) I think there should be a rule that the annotations on a variable or > function should have distinct names. Without such a rule, annotion assertions > don't seem to make much sense. We don't seem to have such a rule at the moment. The WG disagrees - it makes sense to allow multiple annotation assertions with the same name and different parameters. > (c) there is no corresponding error for function annotations. > > If we fix (1) above then we can write this as > > It is a static error [err:XQST0116] if the set of annotations on a function > declaration or variable declaration inlcudes both a %public and a %private > annotation. The WG disagrees. There are no annotation assertions for %public and %private.
I agree with this - it's editorial: > Three problems here. > > (a) the doubled "'s" > > (b) the sentence is ambiguous, it doesn't really state clearly that you can't > have one annotation named %private and another named %public.