This HTML5 document contains 39 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
n23http://vos.openlinksw.com:80/wiki/main/VOS/VirtTipsAndTricksGuideSPARQLBIIF/db.
dctermshttp://purl.org/dc/terms/
n19http://lod.openlinksw.com/sparql?default-graph-uri=&query=%0D%0APREFIX++rdfs%3A++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+++dbo%3A++%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0APREFIX+++dbp%3A++%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0ASELECT++%3Fteam+%0D%0A++++++++%28+%0D%0A++++++++++%28+bif%3Aeither+%28+%3Few+%3D+%27W%27%2C+-1%2C+1+%29+%29+*+%28%3Fd+%2B+%28+%28+%28+%3Fm+*+60+%29+%2B+%3Fs+%29+%2F+3600.0+%29+%29+%0D%0A++++++++++as+%3Fv%0D%0A++++++++%29%0D%0A++%7B+%0D%0A++++%3Fteam++a+++++++++++dbo%3AHockeyTeam++++++++++.+%0D%0A++++%3Fteam++rdfs%3Alabel++%27New+Jersey+Devils%27%40en++.+%0D%0A++++%3Fteam++dbp%3Acity++++%3Fcityname+++++++++++++++.%0D%0A++++%3Fcity++rdfs%3Alabel++%3Fcityname+++++++++++++++.+%0D%0A++++%3Fcity++dbp%3Alongd+++%3Fd++++++++++++++++++++++%3B+%0D%0A+++++++++++dbp%3Alongm+++%3Fm++++++++++++++++++++++%3B+%0D%0A+++++++++++dbp%3Alongs+++%3Fs++++++++++++++++++++++%3B%0D%0A+++++++++++dbp%3Alongew++%3Few+++++++++++++++++++++.+%0D%0A++%7D++%0D%0A&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=15000&debug=
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n17http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n2http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
n10http://dbpedia.org/
dchttp://purl.org/dc/elements/1.1/
n25http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtTipsAndTricksGuideSPARQLBIIF/sioc.
n8http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n21http://docs.openlinksw.com/virtuoso/rdfsparql.html#
n16http://rdfs.org/sioc/services#
siocthttp://rdfs.org/sioc/types#
n22http://vos.openlinksw.com/dataspace/person/dav#
n15http://docs.openlinksw.com/virtuoso/fn_either.
n4http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n14http://vos.openlinksw.com/dataspace/owiki#
n9https://community.openlinksw.com/t/does-virtuoso-support-the-sparql-1-1-if-operator/
n7http://lod.openlinksw.
xsdhhttp://www.w3.org/2001/XMLSchema#
n13http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n22:this
foaf:made
n2:VirtTipsAndTricksGuideSPARQLBIIF
Subject Item
n8:this
sioc:creator_of
n2:VirtTipsAndTricksGuideSPARQLBIIF
Subject Item
n17:item
n16:services_of
n2:VirtTipsAndTricksGuideSPARQLBIIF
Subject Item
n14:this
sioc:creator_of
n2:VirtTipsAndTricksGuideSPARQLBIIF
Subject Item
n4:VOS
sioc:container_of
n2:VirtTipsAndTricksGuideSPARQLBIIF
atom:entry
n2:VirtTipsAndTricksGuideSPARQLBIIF
atom:contains
n2:VirtTipsAndTricksGuideSPARQLBIIF
Subject Item
n2:VirtTipsAndTricksGuideSPARQLBIIF
rdf:type
atom:Entry sioct:Comment
dcterms:created
2017-06-13T05:42:49.562928
dcterms:modified
2020-04-24T16:52:07.906075
rdfs:label
VirtTipsAndTricksGuideSPARQLBIIF
foaf:maker
n13:this n22:this
dc:title
VirtTipsAndTricksGuideSPARQLBIIF
opl:isDescribedUsing
n25:rdf
sioc:has_creator
n8:this n14:this
sioc:attachment
n23:png
sioc:content
%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+ Does Virtuoso support an equivalent to the SPARQL 1.1 "<code>IF</code>" operator? <b>Note</b>: Virtuoso does now support [[VirtTipsAndTricksSPARQL11FeaturesExamplesCollection][SPARQL 1.1]] and the [[https://community.openlinksw.com/t/does-virtuoso-support-the-sparql-1-1-if-operator/1659][IF]] operator. <BR><BR> However, Virtuoso does currently support [[VOSArticleBISPARQL2][SPARQL-BI]], an extension of SPARQL 1.0 which was created before SPARQL 1.1 was ratified. This includes <code>[[http://docs.openlinksw.com/virtuoso/fn_either.html][bif:either]]</code>, an equivalent built-in function ("bif") which should enable the desired results to be obtained. ---++ Using <code>bif:either</code> For this example, a SPARQL query will be executed against the [[http://dbpedia.org/sparql][Virtuoso DBpedia SPARQL endpoint]] to retrieve the decimal longitude of the "NJ Devils' hometown" with cardinal direction (that is, East or West). The <code>bif:either</code> function is used to set the numeric result to positive (East) or negative (West). <verbatim> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> SELECT ?team ( ( bif:either ( ?ew = 'W', -1, 1 ) ) * (?d + ( ( ( ?m * 60 ) + ?s ) / 3600.0 ) ) as ?v ) { ?team a dbo:HockeyTeam . ?team rdfs:label 'New Jersey Devils'@en . ?team dbp:city ?cityname . ?city rdfs:label ?cityname . ?city dbp:longd ?d ; dbp:longm ?m ; dbp:longs ?s ; dbp:longew ?ew . } </verbatim> [[http://lod.openlinksw.com/sparql?default-graph-uri=&query=%0D%0APREFIX++rdfs%3A++%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+++dbo%3A++%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0APREFIX+++dbp%3A++%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0ASELECT++%3Fteam+%0D%0A++++++++%28+%0D%0A++++++++++%28+bif%3Aeither+%28+%3Few+%3D+%27W%27%2C+-1%2C+1+%29+%29+*+%28%3Fd+%2B+%28+%28+%28+%3Fm+*+60+%29+%2B+%3Fs+%29+%2F+3600.0+%29+%29+%0D%0A++++++++++as+%3Fv%0D%0A++++++++%29%0D%0A++%7B+%0D%0A++++%3Fteam++a+++++++++++dbo%3AHockeyTeam++++++++++.+%0D%0A++++%3Fteam++rdfs%3Alabel++%27New+Jersey+Devils%27%40en++.+%0D%0A++++%3Fteam++dbp%3Acity++++%3Fcityname+++++++++++++++.%0D%0A++++%3Fcity++rdfs%3Alabel++%3Fcityname+++++++++++++++.+%0D%0A++++%3Fcity++dbp%3Alongd+++%3Fd++++++++++++++++++++++%3B+%0D%0A+++++++++++dbp%3Alongm+++%3Fm++++++++++++++++++++++%3B+%0D%0A+++++++++++dbp%3Alongs+++%3Fs++++++++++++++++++++++%3B%0D%0A+++++++++++dbp%3Alongew++%3Few+++++++++++++++++++++.+%0D%0A++%7D++%0D%0A&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=15000&debug=on][View the results]] of the query execution on the [[http://lod.openlinksw.com][LOD]] instance. ---+++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsparqlimplementatioptragmas][Supported SPARQL-BI "define" pragmas]] * [[VOSArticleBISPARQL2][SPARQL-BI]]
sioc:id
dff30a614b1e228594ef9351751bcf22
sioc:link
n2:VirtTipsAndTricksGuideSPARQLBIIF
sioc:has_container
n4:VOS
n16:has_services
n17:item
atom:title
VirtTipsAndTricksGuideSPARQLBIIF
sioc:links_to
n2:VOSArticleBISPARQL2 n7:com n9:1659 n2:VirtTipsAndTricksGuide n10:sparql n15:html n19:on n21:rdfsparqlimplementatioptragmas n2:VirtTipsAndTricksSPARQL11FeaturesExamplesCollection
atom:source
n4:VOS
atom:author
n22:this
atom:published
2017-06-13T05:42:49Z
atom:updated
2020-04-24T16:52:07Z
sioc:topic
n4:VOS