W3C home > Mailing lists > Public > public-owl-wg@w3.org > November 2007

owl rational datatype

From: Michael Smith <msmith@clarkparsia.com>
Date: Thu, 29 Nov 2007 18:40:59 -0500
To: public-owl-wg <public-owl-wg@w3.org>
Message-Id: <1196379659.14165.38.camel@msmith-laptop>

In response to an earlier thread on discussing some areas of
insufficiency in XML schema datatypes (see [1],[2],[3]), I've drafted a
proposal for a rational datatype.  The primary motivation is to enable
representation of a larger subset of the real numbers than XML schema
built-ins provide (notably xsd:decimal).

Text is on the wiki at [4] and repeated below.

Comments appreciated.
-- 
Mike Smith

Clark & Parsia

[1] http://www.w3.org/mid/4739B85B.10705@hpl.hp.com
[2] http://www.w3.org/mid/1844.87.113.84.218.1195161243.squirrel@www.csd.abdn.ac.uk
[3] http://www.w3.org/mid/Pine.LNX.4.64.0711160843510.31635@frege.inf.tu-dresden.de
[4] http://www.w3.org/2007/OWL/wiki/OWL_Rational

---

In accordance with RDF Concepts and Abstract Syntax a datatype must have
a lexical space, a value space, and a lexical-to-value mapping.

A URI reference for identifying this datatype is http://@@@@/@#rational

The value space of rational is the subset of the real numbers which can
be represented as a ratio of integers. The order relation on rational is
the order relation on real numbers, restricted to this subset.

The lexical space is defined in the rational production below, using the
standard BNF notation (reusing syntax and definitions from Syntax)

numerator := [ '-' ] digit { digit } 
denominator := nonzero { digit } 
rational := numerator [ '/' denominator ] 

For example -1/3, 41/7, 0/19, 4/2, -6/1, 0, 2, and -6 are all legal
literals for rational. 

The lexical-to-value mapping is a many-to-one mapping. If the '/' and
denominator are present in a literal in the lexical space, the literal
maps to the value in the value space obtained by calculating the ratio
of the integers represented by the numerator and denominator
productions. If the '/' and denominator are absent in a literal in the
lexical space, the literal maps to the integer represented by the
numerator.
Received on Thursday, 29 November 2007 23:52:58 GMT

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