Handle relative IRIs in IRI expansion algorithm
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 09 Aug 2012 17:43:27 +0200
changeset 800 a9f57ae2a07a
parent 799 7b0928c9cbcf
child 801 5a5ab3bf8735
Handle relative IRIs in IRI expansion algorithm

The text was more or less directly copied from the [Turtle spec](http://www.w3.org/TR/2012/WD-turtle-20120710/#sec-iri-references).

This closes #86.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Thu Aug 09 17:13:12 2012 +0200
+++ b/spec/latest/json-ld-api/index.html	Thu Aug 09 17:43:27 2012 +0200
@@ -1296,9 +1296,15 @@
         <em>authority</em> (as defined in [[!RFC3986]]), generate an <tref>IRI</tref>
         by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
         suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
-      <li>Otherwise, if the IRI being processed does not contain a colon and is a property, i.e., a key's value in
+      <li>Otherwise, if the IRI being processed does not contain a colon and is a property, i.e., a key in
         a <tref>JSON object</tref>, or the value of <code>@type</code> and the active context has a
         <code>@vocab</code> mapping, join the mapped value to the suffix using textual concatenation.</li>
+      <li>Otherwise, if the IRI being processed does not contain a colon and is not a property, i.e., not a key in a
+        <tref>JSON object</tref> treat it as a <tref>relative IRI</tref> and resolve it against the base IRI as
+        per [[RFC3986]] using only the basic algorithm in section&nbsp;5.2. Neither <em>Syntax-Based Normalization</em>
+        nor <em>Scheme-Based Normalization</em> (described in sections&nbsp;6.2.2 and&nbsp;6.2.3 of [[RFC3986]]) are performed.
+        Characters additionally allowed in IRI references are treated in the same way that unreserved characters are
+        treated in URI references, per section&nbsp;6.5 of [[RFC3987]].</li>
       <li>Otherwise, use the value directly as an IRI.</li>
     </ol>
   </p>