W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > February 2002

Default Datatype

From: TAN Kuan Hui <kuanhui@mobileworkspace.com>
Date: Thu, 14 Feb 2002 12:52:09 +0800
Message-ID: <001701c1b513$5e91e3f0$200000c0@pinecone>
To: <www-xml-query-comments@w3.org>
In XQuery 1.0, 3.2 Function Definitions

3rd para,
"If a function parameter is declared using a name but no type, it accepts
arguments of any type. If the returns clause is omitted from a function
definition, the function may return a value of any type"

Is this default type (with reference to 2.13 Datatypes)
        item
or 
        item*
or
        xs:anyType
or
        xs:anyType*

(NB: I don't think item == xs:anyType; 
neither is xs:anyType == xs:anyType*, 
so we have to be clear which is which)

I have read Issue 205 but its still not clear what the proposed
resolution means.

also, wrt 2.13 Datatypes, what is the default OccurrenceIndicator ?
* or a singleton ? It seems to me that the "implied" default is
a singleton (as there is no way of indicating a singleton in [56],
maybe it should). Instead of guessing/deducing from other clues, 
maybe this should be made explicit. IMO, the default should be 
* since the value of an expression is always a sequence.

If however singleton is indeed the default, it has to be explained 
why this is so.

Thanks.
Kuan Hui
Received on Wednesday, 13 February 2002 23:53:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:15 UTC