Does Virtuoso support the SPARQL 1.1 " IF
" function?
Virtuoso supports SPARQL 1.1 as can be seen from the Virtuoso Examples Collection for SPARQL 1.1 page.
SPARQL 1.1 IF
function example using BIND:
SELECT *
WHERE
{
VALUES ?s4 { 'US' 'United Kingdom' }
BIND (
IF (?s4 != 'US',
IRI(CONCAT('https://91-divoc.com/pages/covid-visualization/?chart=countries&highlight=',encode_for_uri(?s4),'&show=50&trendline=default&y=fixed&scale=log&data=cases#countries')),
IRI(CONCAT('https://91-divoc.com/pages/covid-visualization/?chart=countries&highlight=',encode_for_uri(bif:INITCAP(LCASE(?s4))),'&show=50&trendline=default&y=fixed&scale=log&data=cases#countries'))
) as ?divocCountryURL
)
}
LIMIT 2
SPARQL 1.1 IF
function example using SELECT:
SELECT ?s4 (
IF (?s4 != 'US',
IRI(CONCAT('https://91-divoc.com/pages/covid-visualization/?chart=countries&highlight=',encode_for_uri(?s4),'&show=50&trendline=default&y=fixed&scale=log&data=cases#countries')),
IRI(CONCAT('https://91-divoc.com/pages/covid-visualization/?chart=countries&highlight=',encode_for_uri(bif:INITCAP(LCASE(?s4))),'&show=50&trendline=default&y=fixed&scale=log&data=cases#countries'))
) as ?divocCountryURL
)
WHERE
{VALUES ?s4 { 'US' 'United Kingdom' } }
LIMIT 2