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

Example for sop:datatype

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Fri, 01 Jul 2005 18:54:06 +0100
Message-ID: <42C5833E.40305@hp.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>


The example in "11.2.3.8 sop:datatype" is

--------
@prefix foaf:       <http://xmlns.com/foaf/0.1/> .
@prefix eg:         <http://biometrics.example/ns#> .
@prefix xsd:        <http://www.w3.org/2001/XMLSchema#> .

_:a  foaf:name       "alice".
_:a  eg:shoeSize     "9.5"^^xsd:float .

_:b  foaf:name       "bob".
_:b  eg:shoeSize     "42"^^xsd:integer .
--------

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX eg:   <http://biometrics.example/ns#>
SELECT ?name ?size
  WHERE { ?x foaf:name  ?name ; eg:shoeSize  ?size .
          FILTER ( datatype(?size) = xsd:int ) }

--------
name 	shoeSize
"Bob" 	42


Making it "datatype(?size) = xsd:integer" would clearly get that answer.  I get 
no rows at the moment and was wondering (hoping) that the "=" was not making use 
of any type/value compatibility rules.

	Andy
Received on Friday, 1 July 2005 17:58:17 GMT

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