This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
7.1.4 The fs:convert-simple-operand function "$actual as item?" In the only use of fs:convert-simple-operand in the FS, the first argument is the result of a call to fn:data, which means it must be of type "xdt:anyAtomicType*". So "item*" could be narrowed to "xdt:anyAtomicType*". "The dynamic semantics of this function are as follows ..." These don't match the function conversion rules of XQuery 3.1.5. Similarly, STA / rule 1 is insufficient.
About the first point: I agree, the type can be made more precise. Fixed for the next version of the document. About the second point: I believe the definition of fs:convert-simple-operand is correct. The function conversion rules in XQuery are as follows: << 1. Atomization is applied to the given value, resulting in a sequence of atomic values. 2. Each item in the atomic sequence that is of type xdt:untypedAtomic is cast to the expected atomic type. For built-in functions where the expected type is specified as numeric, arguments of type xdt:untypedAtomic are cast to xs:double. 3. For each numeric item in the atomic sequence that can be promoted to the expected atomic type using numeric promotion as described in B.1 Type Promotion, the promotion is done. 4. For each item of type xs:anyURI in the atomic sequence that can be promoted to the expected atomic type using URI promotion as described in B.1 Type Promotion, the promotion is done. >> 1. is handled by the introduction of fn:data() during normalization. 3. and 4. are handled by the dynamic semantics of function calls. so fs:convert-simple-operand only deals with 2. something that could be made clearer here is fact that in the case of built-in function with an expected type of numeric, the prototypical value should be of type xs:double. I added a note to that effect for clarification in 4.1.5. Function calls. - Jerome
I said: > > "$actual as item?" > ... "item*" could be narrowed to "xdt:anyAtomicType*". You changed it to "xs:anyAtomicTypeAtomic*". Delete the second "Atomic" (twice).
Fixed. - Jerome
Not quite; there were two occurrences of xs:anyAtomicTypeAtomic, and only one was corrected to xs:anyAtomicType.
This issue (re xs:anyAtomicTypeAtomic) has been entered as FS erratum E004. A fix has been committed to the source files for the next edition of the FS document. Consequently, I'm marking this issue resolved-FIXED, and CLOSED.