RE: [XQuery] static typing of node comparisons

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 UTC