<?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>29614</bug_id>
          
          <creation_ts>2016-05-06 10:39:03 +0000</creation_ts>
          <short_desc>[FO31] fn:data</short_desc>
          <delta_ts>2016-07-21 14:21:19 +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>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>editorial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <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>126364</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-06 10:39:03 +0000</bug_when>
    <thetext>The description of fn:data on arrays in FO31

&quot;If the item is an array, the result of applying fn:data to each member of the array, in order, is appended to the result sequence.&quot;

doesn&apos;t do as good a job of describing the case where the array is empty as in XQ31 which uses the text

&quot;If the item is an array $a, atomization is defined as $a?* ! fn:data(.), which is equivalent to atomizing the members of the array.&quot;

Reading F&amp;O only, I was expecting fn:data([]) to be similar to applying fn:data to a node which does not have a typed value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126365</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-05-06 16:20:09 +0000</bug_when>
    <thetext>The text seems perfectly clear to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126379</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-09 09:54:16 +0000</bug_when>
    <thetext>(In reply to Michael Kay from comment #1)
&gt; The text seems perfectly clear to me.

I&apos;d like to see something along the lines of

  &quot;If the array is empty, the result is the empty sequence&quot;.

added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126679</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-06-06 15:27:24 +0000</bug_when>
    <thetext>If we&apos;re going to say anything special about atomizing an empty array, then we also have to say something about atomizing an empty sequence, since currently both cases rely on the reader understanding that if you do something for each item/member, then if there are no items/members, you do nothing.

I have therefore added the notes:

&lt;p&gt;The result of atomizing an empty sequence is an empty sequence.&lt;/p&gt;
         
&lt;p&gt;The result of atomizing an empty array is an empty sequence.&lt;/p&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>