W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2005

Re: Type errors with xsd:boolean arguments

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 11 Oct 2005 09:23:44 +0100
Message-ID: <434B7690.5000903@hp.com>
To: "Eric Prud'hommeaux" <eric@w3.org>
CC: Dave Beckett <dave.beckett@bristol.ac.uk>, RDF Data Access Working Group <public-rdf-dawg@w3.org>



Eric Prud'hommeaux wrote:
> On Mon, Sep 19, 2005 at 01:51:39PM +0100, Dave Beckett wrote:
> 
>>There seems to be a clash between:
>>  "Functions invoked with an argument of the wrong type will produce a
>>  type error." (11.2)
>>vs
>>  "When a operand is coerced to xs:boolean through invoking a function
>>  that takes a xs:boolean argument, the following rules apply: ..."
>>  (11.2.2)
>>
>>which seems to imply that an arguments to a function that are of type
>>xsd:boolean are always co-erced and never produce a type error?

The only defined functions/operators to take booleans are sop:logical-or, 
sop:logical-and and fn:not.  It might be clearer to explicitly talk about them 
and give the "not" truth table.

Are extension functions typed?  I would hope that EBV rules do not apply and 
they get passed their arguments as-is.

	Andy

> 
> 
> I believe that is true. The ebv rules will give a boolean from any
> arguments. 
> 
> 
>>If that's the case, I suggest changing 11.2 something like:
>>  Functions invoked with an argument of the wrong type (except
>>  xsd:boolean) will produce a type error.
>>  Functions requiring an argument of type xs:boolean are coerced to
>>  xs:boolean using the EBV rules in section 11.2.2
> 
> 
> Done (1.503)
> 
> 
>>(Maybe there should be a new sub-section called "Type Errors"?)
>>
>>Dave
>>
Received on Tuesday, 11 October 2005 08:25:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT