Skip to content

Commit baa9827

Browse files
authored
SPARQL 1.1: test IRI()/URI() on an IRI (#263)
1 parent 2c863ec commit baa9827

4 files changed

Lines changed: 53 additions & 0 deletions

File tree

sparql/sparql11/functions/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,31 @@ <h2>
15541554
</dd>
15551555
</dl>
15561556
</dd>
1557+
<dt id='iri02'>
1558+
<a class='testlink' href='#iri02'>
1559+
iri02:
1560+
</a>
1561+
<span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#iri02' property='mf:name'>IRI()/URI() when the input is an IRI</span>
1562+
</dt>
1563+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#iri02' typeof='mf:QueryEvaluationTest'>
1564+
<div property='rdfs:comment'>
1565+
</div>
1566+
<dl class='test-detail'>
1567+
<dt>type</dt>
1568+
<dd>mf:QueryEvaluationTest</dd>
1569+
<dt>approval</dt>
1570+
<dd property='mf:approval' resource=''></dd>
1571+
<dt>action</dt>
1572+
<dd>
1573+
<dl class='test-detail' property='mf:action' resource=''>
1574+
</dl>
1575+
</dd>
1576+
<dt>result</dt>
1577+
<dd>
1578+
<a href='iri02.srx' property='mf:result'>iri02.srx</a>
1579+
</dd>
1580+
</dl>
1581+
</dd>
15571582
<dt id='if01'>
15581583
<a class='testlink' href='#if01'>
15591584
if01:

sparql/sparql11/functions/iri02.rq

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
BASE <http://example.org/>
2+
SELECT (URI(<uri>) AS ?uri) (IRI(<iri>) AS ?iri)
3+
WHERE {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
3+
<head>
4+
<variable name="uri"/>
5+
<variable name="iri"/>
6+
</head>
7+
<results>
8+
<result>
9+
<binding name="uri"><uri>http://example.org/uri</uri></binding>
10+
<binding name="iri"><uri>http://example.org/iri</uri></binding>
11+
</result>
12+
</results>
13+
</sparql>
14+

sparql/sparql11/functions/manifest.ttl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
:now01
7070
:rand01
7171
:iri01
72+
:iri02
7273
:if01
7374
:if02
7475
:coalesce01
@@ -720,6 +721,16 @@
720721
mf:result <iri01.srx> ;
721722
.
722723

724+
:iri02 rdf:type mf:QueryEvaluationTest ;
725+
mf:name "IRI()/URI() when the input is an IRI" ;
726+
mf:feature sparql:iri ;
727+
mf:feature sparql:uri ;
728+
mf:action
729+
[ qt:query <iri02.rq> ;
730+
qt:data <data.ttl> ] ;
731+
mf:result <iri02.srx> ;
732+
.
733+
723734
:if01 rdf:type mf:QueryEvaluationTest ;
724735
mf:name "IF()" ;
725736
mf:feature sparql:if ;

0 commit comments

Comments
 (0)