This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the XQuery 1.0 specification, at http://www.w3.org/TR/xquery/ It's mentioned in section: "2.1.1 Static Context", 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, "2.4.4 Input Sources", it'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
(In reply to comment #0) > What practical criterias can implementation consider, when returning non-null > 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
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 "the database that I am connected to". 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't get by binding a variable.
(In reply to comment #2) > 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 "the database that I am > connected to". > 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't get by binding a variable. Thanks, Mike for the answer. I do agree with your explanation. Regards, Mukul