How to split a urlencoded ";-" separated list of urls in a SPARQL query?
- Assume the following string:
"http://example.org/test1;http://example.org/test2". - In order to split the given string into two values i.e.
http://example.org/test1
andhttp://example.org/test2
, one should use the Virtuoso function split_and_decode() which returns an array. Thus the Virtuoso function aref() also needs to be used for loading the elements. - Example:
SELECT bif:aref (bif:split_and_decode('http%3A%2F%2Fexample.org%2Ftest1%3Bhttp%3A%2F%2Fexample.org%2Ftest2',0), 0) { ?S ?P ?O } LIMIT 1
- View the SPARQL Query Definition via SPARQL Protocol URL;
- View the SPARQL Query Results via SPARQL Protocol URL