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

Test #typepromotion-decimal-decimal-pass

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 13 Dec 2005 17:26:45 +0000
Message-ID: <439F0455.3070801@hp.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>

In IRC, DanC pointed out:


the core of which is:

datatype("1"^^xsd:unsignedByte + "2"^^xsd:unsignedShort)

The test tests for whether this is xsd:decimal.

http://www.w3.org/TR/xpath-functions/#op.numeric says:

op:operation(xs:integer, xs:integer) ==> xs:integer
   (except for op:numeric-divide(integer, integer), which returns xs:decimal)

op:operation(xs:decimal, xs:decimal) ==>  xs:decimal
op:operation(xs:float, xs:float)     ==> xs:float
op:operation(xs:double, xs:double)   ==> xs:double

and xsd:unsignedByte,xsd:unsignedShort can be used by subtype substitution for 
xsd:integer and no type promotion is necessary.

So I think

   datatype("1"^^xsd:unsignedByte + "2"^^xsd:unsignedShort)

is xsd:integer, not xsd:decimal.

Received on Tuesday, 13 December 2005 17:27:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:37 UTC