Skip to content

Commit a1de58c

Browse files
authored
SPARQL 1.1: REPLACE: cover regex options (#268)
1 parent 1db5fd9 commit a1de58c

4 files changed

Lines changed: 46 additions & 1 deletion

File tree

sparql/sparql11/functions/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,31 @@ <h2>
18541854
</dd>
18551855
</dl>
18561856
</dd>
1857+
<dt id='replace-case-insensitive'>
1858+
<a class='testlink' href='#replace-case-insensitive'>
1859+
replace-case-insensitive:
1860+
</a>
1861+
<span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#replace-case-insensitive' property='mf:name'>REPLACE() with the &#39;i&#39; option</span>
1862+
</dt>
1863+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/functions/manifest#replace-case-insensitive' typeof='mf:QueryEvaluationTest'>
1864+
<div property='rdfs:comment'>
1865+
</div>
1866+
<dl class='test-detail'>
1867+
<dt>type</dt>
1868+
<dd>mf:QueryEvaluationTest</dd>
1869+
<dt>approval</dt>
1870+
<dd property='mf:approval' resource=''></dd>
1871+
<dt>action</dt>
1872+
<dd>
1873+
<dl class='test-detail' property='mf:action' resource=''>
1874+
</dl>
1875+
</dd>
1876+
<dt>result</dt>
1877+
<dd>
1878+
<a href='replace-case-insensitive.srx' property='mf:result'>replace-case-insensitive.srx</a>
1879+
</dd>
1880+
</dl>
1881+
</dd>
18571882
<dt id='uuid01'>
18581883
<a class='testlink' href='#uuid01'>
18591884
uuid01:

sparql/sparql11/functions/manifest.ttl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
:replace01
8282
:replace02
8383
:replace03
84+
:replace-case-insensitive
8485
:uuid01
8586
:uuid02
8687
:struuid01
@@ -850,6 +851,14 @@
850851
mf:result <replace03.srx> ;
851852
.
852853

854+
:replace-case-insensitive rdf:type mf:QueryEvaluationTest ;
855+
mf:name "REPLACE() with the 'i' option" ;
856+
mf:feature sparql:replace ;
857+
mf:action
858+
[ qt:query <replace-case-insensitive.rq> ] ;
859+
mf:result <replace-case-insensitive.srx> ;
860+
.
861+
853862
:uuid01 rdf:type mf:QueryEvaluationTest ;
854863
mf:name "UUID() pattern match" ;
855864
mf:feature sparql:uuid ;
@@ -883,4 +892,3 @@
883892
qt:data <data-empty.nt> ] ;
884893
mf:result <struuid01.srx> ;
885894
.
886-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT (REPLACE("aAbBaC", "a", "~/", "i") AS ?new) WHERE {}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
3+
<head>
4+
<variable name="new"/>
5+
</head>
6+
<results>
7+
<result>
8+
<binding name="new"><literal>~/~/bB~/C</literal></binding>
9+
</result>
10+
</results>
11+
</sparql>

0 commit comments

Comments
 (0)