Simpify IRI expansion (less nesting).
authorDave Longley <dlongley@digitalbazaar.com>
Thu, 04 Apr 2013 14:44:28 -0400
changeset 1541 cc3d830653b7
parent 1540 9911e9e4675f
child 1542 b155bf25a603
Simpify IRI expansion (less nesting).
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Thu Apr 04 20:29:54 2013 +0200
+++ b/spec/latest/json-ld-api/index.html	Thu Apr 04 14:44:28 2013 -0400
@@ -1279,27 +1279,25 @@
           <ol class="algorithm">
             <li>Split <i>value</i> into a <tref>prefix</tref> and <i>suffix</i>
               at the first occurrence of a colon (<code>:</code>).</li>
-            <li>If <tref>prefix</tref> is not underscore (<code>_</code>)
-              and <i>suffix</i> does not begin with double-forward-slash
-              (<code>//</code>), it may be a <tref>compact IRI</tref>:
-              <ol class="algorithm">
-                <li>If <tref>local context</tref> is not <tref>null</tref>, it
-                  contains a key that equals <tref>prefix</tref>, and the value
-                  associated with the key that equals <i>prefix</i> in <i>defined</i>
-                  is not <tref>true</tref>, invoke the
-                  <a href="#create-term-definition">Create Term Definition algorithm</a>,
-                  passing <tref>active context</tref>,
-                  <tref>local context</tref>, <i>prefix</i> as <i>term</i>,
-                  and <i>defined</i>. This will ensure that a
-                  <tref>term definition</tref> is created for <tref>prefix</tref>
-                  in <tref>active context</tref> during
-                  <a href="#context-processing-algorithm">Context Processing</a>.</li>
-                <li>If <tref>active context</tref> contains a <tref>term definition</tref>
-                  for <tref>prefix</tref>, return the result of concatenating
-                  the <tref>IRI mapping</tref> associated with <tref>prefix</tref> and
-                  <i>suffix</i>.</li>
-              </ol>
-            </li>
+            <li>If <tref>prefix</tref> is underscore (<code>_</code>)
+              or <i>suffix</i> begins with double-forward-slash
+              (<code>//</code>), return <i>value</i> as it is already an
+              <tref>absolute IRI</tref>.</li>
+            <li>If <tref>local context</tref> is not <tref>null</tref>, it
+              contains a key that equals <tref>prefix</tref>, and the value
+              associated with the key that equals <i>prefix</i> in <i>defined</i>
+              is not <tref>true</tref>, invoke the
+              <a href="#create-term-definition">Create Term Definition algorithm</a>,
+              passing <tref>active context</tref>,
+              <tref>local context</tref>, <i>prefix</i> as <i>term</i>,
+              and <i>defined</i>. This will ensure that a
+              <tref>term definition</tref> is created for <tref>prefix</tref>
+              in <tref>active context</tref> during
+              <a href="#context-processing-algorithm">Context Processing</a>.</li>
+            <li>If <tref>active context</tref> contains a <tref>term definition</tref>
+              for <tref>prefix</tref>, return the result of concatenating
+              the <tref>IRI mapping</tref> associated with <tref>prefix</tref> and
+              <i>suffix</i>.</li>
             <li>Return <i>value</i> as it is already an <tref>absolute IRI</tref>.</li>
           </ol>
         </li>