Skip to content

Commit 33501cf

Browse files
committed
leaving URI only for termtypes
1 parent eebbf11 commit 33501cf

File tree

1 file changed

+12
-37
lines changed

1 file changed

+12
-37
lines changed

spec/section/termmap.md

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Term Maps
22

3-
An <dfn>RDF term</dfn> is either an [=IRI=], a [=URI=], a [=blank node=], or a [=literal=].
3+
An <dfn>RDF term</dfn> is either an [=IRI=], a [=blank node=], or a [=literal=].
44

55
A <dfn>term map</dfn> (`rml:TermMap`) is a rule that defines how to generate an [=RDF term=] from a [=logical iteration=].
66
The result of the execution of that rule is the <dfn>generated RDF term</dfn>.
@@ -25,15 +25,15 @@ if it is a rule that specifies how the [=datatype IRI=]'s of an object is genera
2525

2626
A [=term map=] generates different types of [=RDF terms=] depending on the position of the [=term map=] in the [=RDF triple=]:
2727
* a [=subject map=] (`rml:SubjectMap`)
28-
is a rule that MUST generate either an [=IRI=], a [=URI=] or a [=blank node=];
28+
is a rule that MUST generate either an [=IRI=], or a [=blank node=];
2929
* a [=predicate map=] (`rml:PredicateMap`)
30-
is a rule that MUST generate an [=IRI=] or a [=URI=];
30+
is a rule that MUST generate an [=IRI=];
3131
* an [=object map=] (`rml:ObjectMap`)
32-
is a rule that MUST generate an [=IRI=], a [=URI=], a [=blank node=] or a [=literal=];
32+
is a rule that MUST generate an [=IRI=], a [=blank node=] or a [=literal=];
3333
* a [=graph map=] (`rml:GraphMap`)
34-
is a rule that SHOULD generate an [=IRI=] or a [=URI=].
34+
is a rule that SHOULD generate an [=IRI=].
3535
* a [=datatype map=] (`rml:DatatypeMap`)
36-
is a rule that MUST generate an [=IRI=] or a [=URI=].
36+
is a rule that MUST generate an [=IRI=].
3737

3838
A [=term map=] MUST have
3939
* 0 or 1 [=datatype map=] or 0 or 1 [=language map=];
@@ -140,9 +140,9 @@ The following table shows examples of strings and their IRI-safe versions:
140140
| ~A_17.1-2 | ~A_17.1-2 |
141141

142142
<aside class="note">
143-
RML always performs percent-encoding when [=IRIs=] or [=URIs=] are generated from [=string templates=].
143+
RML always performs percent-encoding when [=IRIs=] are generated from [=string templates=].
144144
If [=IRIs=] need to be generated without percent-encoding, then the [=term map=] MUST use
145-
`rml:UnsafeIRI` or `rml:UnsafeURI` as [=term type=].
145+
`rml:UnsafeIRI` as [=term type=].
146146
</aside>
147147

148148
<aside class="note">
@@ -237,34 +237,6 @@ Using the [=logical iteration=], the [=template value=] of the [=subject map=] w
237237
</aside>
238238

239239

240-
<aside class="example" id="example-template-iri-safe" title="URI template values">
241-
242-
The following example shows how an [=URI=] template value is created.
243-
Here the `album.json` [=input data source=] is used to generate an [=URI=] using the `Author` name.
244-
245-
<aside class="ex-mapping">
246-
247-
```turtle
248-
249-
<#AuthorTriplesMap>
250-
rml:subjectMap [
251-
rml:template "http://data.example.com/author/{$.Author}" ;
252-
rml:termType rml:URI
253-
] .
254-
```
255-
256-
</aside>
257-
258-
Using the [=logical iteration=], the [=template value=] of the [=subject map=] would be:
259-
260-
<aside class="ex-output">
261-
262-
```turtle
263-
<http://data.example.com/author/Zo%C3%AB%20Kr%C3%BCger>
264-
```
265-
</aside>
266-
</aside>
267-
268240
<aside class="example" id="example-template-backslash-escape" title="Backslash escapes in templates">
269241

270242
The following example shows the use of backslash escapes in string templates. The template will generate a fancy title such as
@@ -310,7 +282,10 @@ The value MUST be an [=IRI=] and MUST be one of the following options:
310282
* If the term map is an [=object map=]: `rml:IRI`, `rml:URI`, `rml:BlankNode`, or `rml:Literal`
311283
* If the term map is a [=graph map=]: `rml:IRI`, `rml:URI`
312284

313-
<!--ToDo: Shall we mention rml:UnsafeIRI and rml:UnsafeURI or mentioning in the previous encoding is enough? -->
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>
314289

315290
### Default Term Types
316291

0 commit comments

Comments
 (0)