Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions spec/section/termmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,24 @@ to any character that is not in the [`iunreserved` production](http://tools.ietf
1. Convert the character to a sequence of one or more octets using [UTF-8](http://tools.ietf.org/html/rfc3629) in [[RFC3629]]
2. [=Percent-encode=] each octet

The following table shows examples of strings and their IRI-safe versions:
If the [=term type=] of the [=template-valued term map=] is `rml:URI`, then a [=reference value transforming function=] MUST be applied during the evaluation of the [=template expression=]. The [=reference value transforming function=] MUST transform a [=reference value=] into a [=URI-safe version=] of that value.

The <dfn data-lt="URI-safe">URI-safe version</dfn> of a string is obtained by applying the following transformation to any character that is
not in the [`unreserved` production](https://www.rfc-editor.org/rfc/rfc3986#section-2.3) in [[RFC3986]]:

| String | IRI-safe version |
| :-------------| :-----|
| 42 | 42 |
| Hello World! | Hello%20World%21 |
| 2011-08-23T22:17:00Z | 2011-08-23T22%3A17%3A00Z |
| ~A_17.1-2 | ~A_17.1-2 |
1. Convert the character to a sequence of one or more octets using [UTF-8](http://tools.ietf.org/html/rfc3629) in [[RFC3629]]
2. [=Percent-encode=] each octet

The following table shows examples of strings and their IRI-safe and URI-safe versions:


| String | IRI-safe version | URI-safe version |
|:---------------------|:-------------------------|:-------------------------|
| 42 | 42 | 42 |
| Hello World! | Hello%20World%21 | Hello%20World%21 |
| 2011-08-23T22:17:00Z | 2011-08-23T22%3A17%3A00Z | 2011-08-23T22%3A17%3A00Z |
| ~A_17.1-2¢ | ~A_17.1-2¢ | ~A_17.1-2%C2%A2 |
| Zoë Krüger | Zoë%20Krüger | Zo%C3%AB%20Kr%C3%BCger |

<aside class="note">
RML always performs percent-encoding when [=IRIs=] are generated from [=string templates=].
Expand Down
Loading