RE: question regarding element types in function definitions/XQuery

I could buy that -- they both mean the same thing, just that form (2)
would need to do an extra static type check (and could throw a static
type error).

And are you saying that

element bar of type xs:integer

would be a static error if element bar was globally defined to be of
type xs:decimal, even though xs:integer is a subtype?  (I think this
makes the most sense to me, but still begs the question -- why allow
this syntax at all?)

	-Todd

-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Jonathan Robie
Sent: Friday, February 21, 2003 1:25 PM
To: Todd A. Mancini; public-qt-comments@w3.org
Subject: RE: question regarding element types in function
definitions/XQuery


At 01:12 PM 2/21/2003 -0500, Todd A. Mancini wrote:

>(1) element bar
>
>(2) element of type xs:integer
>
>When these are combined, it appears that the WG is struggling to decide
>which form restricts which.  Does the 1st form restrict the 2nd form,
or
>vice-versa?  Maybe there' a third answer -- neither.  Life becomes
>easier if

Another way to look at this is to say that (1) has a default type - the 
type found in the global bar element declaration. Then and (2) have the 
same semantics - they both match an item if the item's element name and
the 
type correspond to the name and type of the SequenceType.

Is that a bridge we could sell you?

Jonathan 

Received on Friday, 21 February 2003 14:06:13 UTC