Re: ISSUE: XQuery 'constructor' syntax.

Hi Shawn,

I have raised the following issue on our internal mailing lists:

>If a simple type constructor looks like a function, can it be used as a
>function? Consider the following:
>
>let $s := "2002-01-01"
>return date($s) = date("2002-01-01")
>
>Is the above a valid query? Must the argument of a constructor be a literal
>string, or can it also be an expression that evaluates to a string? Note
>that the F&O document seems to allow either, eg:
>
>xf:date(string $srcval) => date
>
>Should implementations of XQuery allow constructors as functions, but
>optimize by interpreting constructors with literal string arguments at
>query parse time?
>
>Jonathan

This is currently under discussion. Personally, I would like to see us 
allow constructors as functions, and allow implementations to detect 
constructors with literal strings, but we'll see what the Working Groups 
decide.

Jonathan

Received on Wednesday, 23 January 2002 12:56:18 UTC