<?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>29671</bug_id>
          
          <creation_ts>2016-05-27 11:29:55 +0000</creation_ts>
          <short_desc>[Fo31] fn:random-number-generator</short_desc>
          <delta_ts>2016-07-21 13:56:14 +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>https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-31/html/Overview.html#func-random-number-generator</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>andrew_coleman</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>126607</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-27 11:29:55 +0000</bug_when>
    <thetext>Can we please change the signature of

fn:random-number-generator($seed	 as xs:anyAtomicType) as map(xs:string, item())

to

fn:random-number-generator($seed	 as xs:anyAtomicType?) as map(xs:string, item())

such that a call of fn:random-number-generate( () ) is equivalent to calling fn:random-number-generator().

in keeping the convention often used in F&amp;O?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126609</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-27 11:47:54 +0000</bug_when>
    <thetext>On closer inspection, this isn&apos;t the convention at all.

Please ignore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126610</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-27 11:52:29 +0000</bug_when>
    <thetext>Actually, this does make sense, since it provides a way to use the unary function to &quot;choose a seed that is likely to be different from one execution scope&quot; as per the zero-arity version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126726</commentid>
    <comment_count>3</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2016-06-10 14:30:19 +0000</bug_when>
    <thetext>At the meeting on 2016-06-07, the WG agreed to resolve this as follows:

RESOLVED: to adopt the proposal in bug 29671 to make
random-number-generator#1 accept an empty sequence as argument, with
the behavior being the same as for random-number-generator#0.

Actions A-645-01 and A-645-02 were raised to track this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126741</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-06-13 08:53:47 +0000</bug_when>
    <thetext>Tests have been added.

I&apos;ve presumed that the text will make it clear that a call

fn:generate()

is exactly equivalent to a call to

fn:generate( () )

in the sense that they will generate exactly the same random sequence, e.g. such that

fn:generate()?number eq fn:generate( () )?number</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>