Re: 11th hour datatype testing proposal

Sorry if I'm behind here ....

Eric Prud'hommeaux wrote:
> I expect to do some worksmithing to clarify the semantics of types
> derived from decimal near [[
> 
> XML Schema [] defines a set of types derived from decimal: integer,
> nonPositiveInteger, negativeInteger, long, int, short, byte,
> nonNegativeInteger, unsignedLong, unsignedInt, unsignedShort,
> unsignedByte and positiveInteger. These are all treated as decimals
> for computing effective boolean values.
> ]]
> 
> Other than that, I think that section 11 is reasonably implementable
> and somewhat readable. Howard has given it a brief sanity check and
> supplemented my understanding of how XQuery does numeric comparison.

I woudl be really, really grateful to Howard for such an explaination or some 
pointers.  We might even want a (non-normative) guide in rq23.

> 
> I have a few relevent tests to help the WG decide if this is a good
> idea (vs. the more computationlly intensive and scarier space of
> numbers being equivilent in the FILTER when they weren't in the
> graph match).
> 
> whether different datatypes restricted from decimal have the same
> value (I said "no"):
> http://dev.w3.org/cvsweb/perl/modules/W3C/Rdf/test/SPARQL-DT-0-alg.sh?rev=HEAD&content-type=text/x-cvsweb-markup

Is there a missing "not both" somewhere as in "not both restricted from decimal"?

Things restricted from decimal do have the same value but this test isn't about 
that - it xsd:int and xsd:float (which is not from decimal).

> 
> whether known datatypes restricted from decimal can be cast to an
> equivalent values (I said "yes"):
> http://dev.w3.org/cvsweb/perl/modules/W3C/Rdf/test/SPARQL-DT-1-alg.sh?rev=HEAD&content-type=text/x-cvsweb-markup

This test is about int and float again.

What's "sameAs" exactly?

> 
> whether non-0 datatypes restricted from decimal have an ebv of true.
> (I said "yes"):
> http://dev.w3.org/cvsweb/perl/modules/W3C/Rdf/test/SPARQL-DT-2-alg.sh?rev=HEAD&content-type=text/x-cvsweb-markup
> 
> whether uncastables yield an error. (I said "yes"):
> http://dev.w3.org/cvsweb/perl/modules/W3C/Rdf/test/SPARQL-DT-3-alg.sh?rev=HEAD&content-type=text/x-cvsweb-markup

Agreed.

 Andy

Received on Wednesday, 13 April 2005 16:15:49 UTC