Explain "//" safety measure in compact IRIs
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 18 Mar 2012 19:16:44 +0800
changeset 382 3f4411ae2c58
parent 381 396e5a264a8a
child 383 a91a7a5122dc
Explain "//" safety measure in compact IRIs

I've added an explanation of the "//" safety measure in compact IRIs.

This closes #46.
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-syntax/index.html	Sun Mar 18 18:41:08 2012 +0800
+++ b/spec/latest/json-ld-syntax/index.html	Sun Mar 18 19:16:44 2012 +0800
@@ -1315,15 +1315,17 @@
     Instead of having to remember and type out the entire IRI, the developer
     can instead use the prefix in their JSON-LD markup.
   </p>
-  <p>To generate an <tref>IRI</tref> out of a <tref>compact IRI</tref>,
-    the value is first split into a <em>prefix</em> and
-    <em>suffix</em> at the first occurrence of a colon (<code>:</code>).
-    If the <tref>active context</tref> contains a term mapping for
-    <em>prefix</em>, an IRI is generated by prepending the mapped
-    <em>prefix</em> to the (possibly empty) <em>suffix</em> using textual
-    concatenation.  If no prefix mapping is defined, the value is used
-    directly as an IRI. If the prefix is an underscore
-    (<code>_</code>), the IRI remains unchanged.
+  <p>Terms are interpreted as <tref>compact IRI</tref>s if they contain at least one
+    colon and the first colon is not followed by two slashes (<code>//</code>, as in
+    <code>http://example.com</code>). To generate the full <tref>IRI</tref>,
+    the value is first split into a <em>prefix</em> and <em>suffix</em> at the first
+    occurrence of a colon (<code>:</code>). If the <tref>active context</tref>
+    contains a term mapping for <em>prefix</em>, an IRI is generated by
+    prepending the mapped <em>prefix</em> to the (possibly empty) <em>suffix</em>
+    using textual concatenation.  If no prefix mapping is defined, the value is used
+    directly as an <tref>absolute IRI</tref>. If the prefix is an underscore
+    (<code>_</code>), the IRI remains unchanged. This effectively means that every term
+    containing a colon will be interpreted by a JSON-LD processor as an IRI.
   </p>
   <p>
     The ability to use <tref title="compact_iri">compact IRIs</tref> reduces the need for developers