<?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>5647</bug_id>
          
          <creation_ts>2008-04-19 04:30:09 +0000</creation_ts>
          <short_desc>[XQuery] Default collection</short_desc>
          <delta_ts>2008-04-19 07:31:42 +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>XQuery 1.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/xquery/</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="Mukul Gandhi">mukul_gandhi</reporter>
          <assigned_to name="Don Chamberlin">chamberl</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>19887</commentid>
    <comment_count>0</comment_count>
    <who name="Mukul Gandhi">mukul_gandhi</who>
    <bug_when>2008-04-19 04:30:09 +0000</bug_when>
    <thetext>In the XQuery 1.0 specification, at http://www.w3.org/TR/xquery/

It&apos;s mentioned in section: &quot;2.1.1 Static Context&quot;, the following point:

Statically known default collection type. This is the type of the sequence of nodes that would result from calling the fn:collection function with no arguments. Unless initialized to some other value by an implementation, the value of statically known default collection type is node()*.

Then in section, &quot;2.4.4 Input Sources&quot;, it&apos;s mentioned:
The fn:collection function with zero arguments returns the default collection, an implementation-dependent sequence of nodes.

My question is:
What practical criterias can implementation consider, when returning non-null values from fn:collection function?

Should we not have simply said, nothing is returned (or, void) when fn:collection function is called with no arguments?

Regards,
Mukul</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19888</commentid>
    <comment_count>1</comment_count>
    <who name="Mukul Gandhi">mukul_gandhi</who>
    <bug_when>2008-04-19 04:33:48 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; What practical criterias can implementation consider, when returning non-null
&gt; values from fn:collection function?

Sorry, I wanted to actually say:
What practical criterias can implementation consider, when returning non-null
values from fn:collection function, *when called with no arguments*?

Should we not have simply said, nothing is returned (or, void) when
fn:collection function is called with no arguments?

Regards,
Mukul</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19889</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-04-19 07:16:37 +0000</bug_when>
    <thetext>It was thought that some XML database products might allow your application to connect to a database using facilities in the API, and then use the collection() function (with no arguments) to mean &quot;the database that I am connected to&quot;.

Equally, a filestore/memory implemementation might allow the contents of collection() to be bound from the command line - though that offers nothing that you couldn&apos;t get by binding a variable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19890</commentid>
    <comment_count>3</comment_count>
    <who name="Mukul Gandhi">mukul_gandhi</who>
    <bug_when>2008-04-19 07:31:42 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; It was thought that some XML database products might allow your application to
&gt; connect to a database using facilities in the API, and then use the
&gt; collection() function (with no arguments) to mean &quot;the database that I am
&gt; connected to&quot;.
&gt; Equally, a filestore/memory implemementation might allow the contents of
&gt; collection() to be bound from the command line - though that offers nothing
&gt; that you couldn&apos;t get by binding a variable.

Thanks, Mike for the answer. I do agree with your explanation.

Regards,
Mukul

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>