W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > July 2007

EBV of invalid numeric literals

From: Arjohn Kampman <arjohn.kampman@aduna-software.com>
Date: Wed, 18 Jul 2007 14:28:10 +0200
Message-ID: <469E075A.2010602@aduna-software.com>
To: public-rdf-dawg-comments@w3.org

Dear DAWG,

It's not completely clear to me what the Effective Boolean Value of
invalid numeric literals should be. I have been unable to find a
decisive answer in the current SPARQL specification.

The current definition of EBV states:

   "If the argument is a numeric type or a typed literal with a datatype
    derived from a numeric type, the EBV is false if the operand value is
    NaN or is numerically equal to zero; otherwise the EBV is true."

With this definition, it's clear that the EBV of "0"^^xsd:integer should
be <false> and the EBV of "12345"^^xsd:int should be <true>. However, it
doesn't exactly cover the case of invalid numeric literals like
"bla"^^xsd:integer. I assume that this would result in a type error, but
with the definition quoted above it could just as well evaluate to
<true>.

The EBV definition for boolean literals is a little clearer, but it also
leaves room for interpretation.

I would appreciate it if someone could clarify what the expected
behaviour should be.

Thanks,

Arjohn

-- 
Arjohn Kampman, Senior Software Engineer
Aduna - Guided Exploration
www.aduna-software.com
Received on Wednesday, 18 July 2007 12:28:48 GMT

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