Extraneous schema tags in SPARQL query -


i have written sparql query.

prefix table:<http://www.daml.org/2003/01/periodictable/periodictable#> select ?name ?color <periodictable.owl> { ?element table:group ?group.   ?group table:name "noble gas".   ?element table:name ?name.   ?element table:color ?color. } 

i getting output schema tags attached below:

| "chlorine"^^<http://www.w3.org/2001/xmlschema#string>    | "green"^^<again link> 

and on... |

why happen, , how should correct it?

in rdf data querying there typed literals, typed literal name suggests literal associated datatype.

rdf , sparql defers xml schema datatypes common data types hence why see these particular uris in output.

you can have sparql engine strip datatypes off values using str() function so:

prefix table:<http://www.daml.org/2003/01/periodictable/periodictable#>  select (str(?name) ?namestring) (str(?color) ?colourstring) <periodictable.owl> {    ?element table:group ?group.   ?group table:name "noble gas".   ?element table:name ?name.   ?element table:color ?color. } 

this requires sparql engine supports sparql 1.1 since uses select expressions feature, sparql engines these days support this.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -