Skip to content

Commit b253ea7

Browse files
authored
Merge pull request #247 from dachafra/test-cases
proposal to fix IRI, URI and UnsafeIRI tests
2 parents d486c7f + b96597b commit b253ea7

File tree

16 files changed

+3981
-151
lines changed

16 files changed

+3981
-151
lines changed

spec/section/termmap.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,6 @@ The value MUST be an [=IRI=] and MUST be one of the following options:
282282
* If the term map is an [=object map=]: `rml:IRI`, `rml:URI`, `rml:BlankNode`, or `rml:Literal`
283283
* If the term map is a [=graph map=]: `rml:IRI`, `rml:URI`
284284

285-
<aside class="note">
286-
When [=URIs=] are generated from [=string templates=], RML performs percent-encoding in the same way as for [=IRIs=].
287-
To generate [=URIs=] without applying percent-encoding, the [=term map=] MUST have a [=term type=] of rml:UnsafeURI.
288-
</aside>
289285

290286
### Default Term Types
291287

test-cases/RMLTC0027a-JSON/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{"Name": "Alice"},
1616
{"Name": "Bob"},
1717
{"Name": "Bob/Charles"},
18-
{"Name": "Danny"},
18+
{"Name": "Zoë Krüger"},
1919
{"Name": "Emily Smith"}
2020
]
2121
}
@@ -53,7 +53,7 @@
5353
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5454
<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5555
<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
56-
<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
56+
<http://example.com/Person/Zo%C3%AB%20Kr%C3%BCger> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5757
<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5858
5959
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
22
<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
33
<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
4-
<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
4+
<http://example.com/Person/Zo%C3%AB%20Kr%C3%BCger> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
55
<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

test-cases/RMLTC0027a-JSON/student.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{"Name": "Alice"},
44
{"Name": "Bob"},
55
{"Name": "Bob/Charles"},
6-
{"Name": "Danny"},
6+
{"Name": "Zoë Krüger"},
77
{"Name": "Emily Smith"}
88
]
99
}

test-cases/RMLTC0027b-JSON/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## RMLTC0027b-JSON
22

3-
**Title**: "Generation of triples using the UnsafeURI term type"
3+
**Title**: "Generation of triples using the UnsafeIRI term type"
44

5-
**Description**: "Tests the generation of triples with a UnsafeURI term type in the subject or object"
5+
**Description**: "Tests the generation of triples with a UnsafeIRI term type in the subject or object"
66

77
**Default Base IRI**: http://example.com/
88

@@ -12,11 +12,9 @@
1212
```
1313
{
1414
"students": [
15-
{"Name": "Alice"},
16-
{"Name": "Bob"},
1715
{"Name": "Bob/Charles"},
18-
{"Name": "Danny"},
19-
{"Name": "Emily Smith"}
16+
{"Name": "Emily Smith"},
17+
{"Name": "Zoë Krüger"}
2018
]
2119
}
2220
@@ -43,18 +41,16 @@
4341
];
4442
rml:subjectMap [
4543
rml:template "http://example.com/Person/{$.Name}";
46-
rml:termType rml:UnsafeURI
44+
rml:termType rml:UnsafeIRI
4745
] .
4846
4947
```
5048

5149
**Output**
5250
```
53-
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
54-
<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
55-
<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
56-
<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
57-
<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
51+
<http://example.com/Person/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
52+
<http://example.com/Person/Emily Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
53+
<http://example.com/Person/Zoë Krüger> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5854
5955
```
6056

test-cases/RMLTC0027b-JSON/mapping.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
];
1818
rml:subjectMap [
1919
rml:template "http://example.com/Person/{$.Name}";
20-
rml:termType rml:UnsafeURI
20+
rml:termType rml:UnsafeIRI
2121
] .
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
2-
<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
3-
<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
4-
<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5-
<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
1+
<http://example.com/Person/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
2+
<http://example.com/Person/Emily Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
3+
<http://example.com/Person/Zoë Krüger> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"students": [
3-
{"Name": "Alice"},
4-
{"Name": "Bob"},
53
{"Name": "Bob/Charles"},
6-
{"Name": "Danny"},
7-
{"Name": "Emily Smith"}
4+
{"Name": "Emily Smith"},
5+
{"Name": "Zoë Krüger"}
86
]
97
}

test-cases/RMLTC0027c-JSON/README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## RMLTC0027c-JSON
22

3-
**Title**: "Generation of triples using the UnsafeIRI term type"
3+
**Title**: "Generation an IRI using the term type IRI"
44

5-
**Description**: "Tests the generation of triples with a UnsafeIRI term type in the subject or object"
5+
**Description**: "Tests the generation of triples with a IRI term type in the subject"
66

77
**Default Base IRI**: http://example.com/
88

@@ -12,11 +12,7 @@
1212
```
1313
{
1414
"students": [
15-
{"Name": "Alice"},
16-
{"Name": "Bob"},
17-
{"Name": "Bob/Charles"},
18-
{"Name": "Danny"},
19-
{"Name": "Emily Smith"}
15+
{"Name": "Zoë Krüger"}
2016
]
2117
}
2218
@@ -43,18 +39,15 @@
4339
];
4440
rml:subjectMap [
4541
rml:template "http://example.com/Person/{$.Name}";
46-
rml:termType rml:UnsafeIRI
42+
rml:termType rml:IRI
4743
] .
4844
4945
```
5046

5147
**Output**
5248
```
53-
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
54-
<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
55-
<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
56-
<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
57-
<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
49+
<http://example.com/Person/Zoë%20Krüger> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
50+
5851
5952
```
6053

test-cases/RMLTC0027c-JSON/mapping.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
];
1818
rml:subjectMap [
1919
rml:template "http://example.com/Person/{$.Name}";
20-
rml:termType rml:UnsafeIRI
20+
rml:termType rml:IRI
2121
] .

0 commit comments

Comments
 (0)