W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2003

RE: [XQuery] static typing of node comparisons

From: Michael Rys <mrys@microsoft.com>
Date: Fri, 28 Nov 2003 00:16:22 -0800
Message-ID: <EB0A327048144442AFB15FCE18DC96C701642DB1@RED-MSG-31.redmond.corp.microsoft.com>
To: "David Carlisle" <davidc@nag.co.uk>, <public-qt-comments@w3.org>

You are correct, this expression raises a static type error with static
typing. It may be better to either use exactly-one() or zero-or-one(),
use [1], use a for iterator, or define is and <<,>> using existential
quantification.

Best regards
Michael

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of David Carlisle
> Sent: Thursday, November 27, 2003 9:44 AM
> To: public-qt-comments@w3.org
> Subject: [XQuery] static typing of node comparisons
> 
> 
> 
> 
> F&O lists the node comparison operators  op:is-same-node etc as having
> parameters of type node().
> 
> The formal semantics mappings handle the case where a parameter is ()
> but in something like the examples
> 
> //book[isbn="1558604820"] is //book[call="QA76.9 C3845"]
> 
> //purchase[parcel="28-451"] << //sale[parcel="33-870"]
> 
> both from 3.5.3 Node Comparisons
> isn't the static type of the arguments node()* rather than node()
> and you'd have to use
> fn:exactly-one() on both of the arguments if you had a system using
the
> static typing from the Formal semantics?
> 
> I hope I'm mistaken but if so could there be a reference in 3.5.3 to
> whatever part of whichever document it is that I missed.
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
Received on Friday, 28 November 2003 03:16:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:03 GMT