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

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.



Arjohn Kampman, Senior Software Engineer
Aduna - Guided Exploration
Received on Wednesday, 18 July 2007 12:28:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:08 UTC