W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2006

[Fwd: xsd:unsignedByte + xsd:unsignedShort = xsd:decimal?]

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 26 Jun 2006 11:41:47 +0100
Message-ID: <449FB9EB.9020802@hp.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>

I agree with this comment - looks wrong to me.

http://lists.w3.org/Archives/Public/public-rdf-dawg/2005OctDec/0339.html

	Andy

-------- Original Message --------
Subject: xsd:unsignedByte + xsd:unsignedShort = xsd:decimal?
Resent-Date: Thu, 22 Jun 2006 11:39:56 +0000
Resent-From: public-rdf-dawg-comments@w3.org
Date: Thu, 22 Jun 2006 13:39:33 +0200
From: Jan Wielemaker <wielemak@science.uva.nl>
Organization: HCS, University of Amsterdam
To: public-rdf-dawg-comments@w3.org


Hi,

According to SPARQL test 'typePromotion-decimal-decimal-pass' (below),
adding unsignedByte to unsignedShort should return xsd:decimal.
According to http://www.w3.org/TR/xpath-functions/#numeric-functions however
this should be xsd:integer (which makes more sense to me).  Am I correct to
conclude this test is wrong?

	Thanks --- Jan

# Positive test: product of type promotion within the xsd:decimal type tree.
# $Id: typePromotion-decimal-decimal-pass.rq,v 1.2 2006/01/13 15:24:07 eric
Exp $

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?one ?two
  WHERE { ?one rdf:value ?oneL .
          ?two rdf:value ?twoL .
          FILTER ( datatype(?oneL) = xsd:unsignedByte &&
                   datatype(?twoL) = xsd:unsignedShort &&
                   datatype(?oneL + ?twoL) = xsd:decimal ) }
Received on Monday, 26 June 2006 10:43:31 GMT

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