<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1746</bug_id>
          
          <creation_ts>2005-07-19 05:31:58 +0000</creation_ts>
          <short_desc>[FS] editorial: 7.1.4 The fs:convert-simple-operand function</short_desc>
          <delta_ts>2007-09-18 23:28:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Formal Semantics 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Michael Dyck">jmdyck</assigned_to>
          <cc>jmdyck</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4858</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-19 05:31:58 +0000</bug_when>
    <thetext>7.1.4 The fs:convert-simple-operand function

&quot;$actual as item?&quot;
    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 &quot;xdt:anyAtomicType*&quot;. So &quot;item*&quot; could be narrowed to
    &quot;xdt:anyAtomicType*&quot;.

&quot;The dynamic semantics of this function are as follows ...&quot;
    These don&apos;t match the function conversion rules of XQuery 3.1.5.
    Similarly, STA / rule 1 is insufficient.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8352</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-02-21 17:51:44 +0000</bug_when>
    <thetext>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:

&lt;&lt;
   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.
&gt;&gt;

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

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12318</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-10-05 19:17:18 +0000</bug_when>
    <thetext>I said:
&gt; 
&gt; &quot;$actual as item?&quot;
&gt;     ... &quot;item*&quot; could be narrowed to &quot;xdt:anyAtomicType*&quot;.

You changed it to &quot;xs:anyAtomicTypeAtomic*&quot;. Delete the second &quot;Atomic&quot; (twice).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13601</commentid>
    <comment_count>3</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-01-16 17:59:46 +0000</bug_when>
    <thetext>Fixed.
- Jerome
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15060</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2007-05-09 22:17:26 +0000</bug_when>
    <thetext>Not quite; there were two occurrences of xs:anyAtomicTypeAtomic, and only one was corrected to xs:anyAtomicType.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16675</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2007-09-18 23:28:31 +0000</bug_when>
    <thetext>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&apos;m marking this issue resolved-FIXED, and CLOSED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>