Showing posts with label IRI. Show all posts
Showing posts with label IRI. Show all posts

# How to query SPARQL with spaces?

 RDF itself uses RDF URI references. The SPARQL query language, on the other hand, uses IRIs (the reason is that RDF predates IRIs and the notion of RDF URI references was developed in anticipation of what IRIs were expected to eventually look like. They almost got it right :)).


RDF URI references allow whitespaces while IRIs do not. 

Another way of doing this is by using FILTER (STR(?Y)) "your url") like below:


PREFIX owl:  

SELECT ?y 

WHERE { 

   ?y owl:sameAs ?x

   FILTER (str(?x) = "http://website.com/urls/playing fun")

}

[1]. http://stackoverflow.com/questions/9055146/querying-with-spaces-sparql

IRI, URI, URL and URN

IRI : (Internationalized Resource Identifier), compare to URI, it's characters are Unicode which means including Chinese, Japanese and Koreans etc.

URI : (Uniform Resource Identifier ), includes URL and URN.

URL : (Uniform Resource Locator), usually using specific protocols to locate resource within World Wide Web is the most common type of URI.

URN : (Uniform Resource Name), is also one of the URI type with urn:scheme and the typical use example is ISBN system.