[redland-dev] Does Rasqal support xsd:dataType?

Seaborne, Andy andy.seaborne at hp.com
Mon Apr 24 15:20:54 BST 2006


Kim,

This line isn't what you might be expecting it is:

<dc:date rdf:datatype="xsd:dateTime">2006-04-14T16:33:01</dc:date>

You have a qname in the attribute value.  RDF requires the full URI to
give the (ugly)

<dc:date
   rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
   >2006-04-14T16:33:01</dc:date>

(Line breaks added because of email)

[[In fact, what you have written is that the datatype has absolute URI
"xsd:dateTime" which is a URI with scheme name "xsd" (like "http") and
scheme specific part "dateTime".  Nothing to do with XSD dataTime.  But
I don't know why you don't get any answers as the query is not that
specific

As your RDF stands the answer to your query is (if you got nothing,
something else is happening as well):

?d = "2006-04-14T16:33:01"^^<xsd:dateTime>

which is nothing to do with XSD dataTime.
]]

With change above, using the full URI for dataTime, you should get the
answer you expect.

	Andy

-------- Original Message --------
> From: Hyunki Kim <>
> Date: 24 April 2006 09:15
> 
> Hi,
> 
> After inserting a RDF document to the mysql, I had a problem in
> querying with the following SPARQL statement. 
> 
> 1. SPARQL Query
> prefix dc:         <http://purl.org/dc/elements/1.1/>
> PREFIX xsd:    <http://www.w3.org/2001/XMLSchema#>
> SELECT ?d
> WHERE { ?x  dc:date ?d . }
> 
> 2. RDF document
> 
> <?xml version="1.0"?>
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
>      xmlns:dc="http://purl.org/dc/elements/1.1/">
>   <rdf:Description rdf:about="http://purl.org/net/dajobe/">
>     <dc:title>Dave Beckett's Home Page</dc:title>
>     <dc:creator>Dave Beckett</dc:creator>
>     <dc:description>The generic home page of Dave
>     Beckett.</dc:description> <dc:date
>   rdf:datatype="xsd:dateTime">2006-04-14T16:33:01</dc:date>
> </rdf:Description> </rdf:RDF>
> 
> The readland returned no results.
> In the RDF document, there is a "dc:date" element with the attribute
> "xsd:dateTime". 
> When I tried to search that document with the following statement, I
> got no results. 
> Thanks for your consideration.
> 
> Sincerely,
> 
> Kim
> 
> _______________________________________________
> redland-dev mailing list
> redland-dev at lists.librdf.org
> http://lists.gnomehack.com/mailman/listinfo/redland-dev


More information about the redland-dev mailing list