Add produceGeneralizedRdf and related edits to the API.
This addresses David Booth's comments in issue #222.
--- a/spec/latest/json-ld-api/index.html Sat Jul 20 16:44:48 2013 -0400
+++ b/spec/latest/json-ld-api/index.html Sat Jul 20 14:37:51 2013 -0700
@@ -189,6 +189,10 @@
and the Convert to RDF algorithms</li>
<li>Raise an error if a blank node is used as data type</li>
<li>Clarify that blank node identifier are supported as value of <code>@vocab</code></li>
+ <li>When generating RDF, exclude <tref title="rdf triple">triples</tref> containing a
+ <tref>blank node</tref> <tref title="rdf predicate">predicate</tref>, unless the
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-produceGeneralizedRdf">produceGeneralizedRdf</a></code>
+ option is set.</li>
</ul>
</section>
@@ -3136,17 +3140,12 @@
<a href="mailto:public-rdf-comments@w3.org">public-rdf-comments@w3.org</a>.
For the current status see
<a href="http://www.w3.org/2011/rdf-wg/wiki/JSON-LD_Features_at_Risk">features "at risk" in JSON-LD 1.0</a></p>
- <p>RDF does not currently allow a <tref>blank node</tref> to be
- used as <tref>property</tref>, while JSON-LD
- does. <tref title="JSON-LD-RDF Converter">JSON-LD-RDF Converters</tref>
- can work around this restriction, when converting JSON-LD to RDF, by
- converting such <tref title="blank node">blank nodes</tref> to
- <tref title="IRI">IRIs</tref>, minting new "Skolem IRIs" as per
- <cite><a href="http://www.w3.org/TR/rdf11-concepts/#section-skolemization">Replacing Blank Nodes with IRIs</a></cite>
- of [[RDF11-CONCEPTS]]. Based on feedback from implementors the
- Working Group may decide to disallow blank nodes as graph names and
- properties in JSON-LD. If this change would affect you, be sure to
- send in a comment.</p>
+ <p>RDF graphs do not allow <tref title="blank node">blank nodes</tref> to be used
+ as an <tref>RDF predicate</tref>, while JSON-LD does.
+ Unless the
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-produceGeneralizedRdf">produceGeneralizedRdf</a></code>
+ option is set, this algorithm will exclude
+ triples including a <tref>blank node</tref> <tref>RDF predicate</tref>.</p>
</div>
<section class="informative">
@@ -3176,7 +3175,11 @@
<h3>Algorithm</h3>
<p>The algorithm takes a JSON-LD document <i>element</i> and returns an
- <tref>RDF dataset</tref>.</p>
+ <tref>RDF dataset</tref>. Unless set, the
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-produceGeneralizedRdf">produceGeneralizedRdf</a></code>
+ option of a <tref>JSON-LD API Implementation</tref> causes an <tref>RDF triple</tref>
+ containing a <tref>blank node</tref> <tref title="rdf predicate">predicate</tref> to be
+ excluded from output.</p>
<p>This algorithm generates new <tref title="blank node identifier">blank node identifiers</tref>
and relabels existing <tref title="blank node identifier">blank node identifiers</tref>.
@@ -3208,6 +3211,9 @@
and <i>type</i> to <i>triples</i>.</li>
<li>Otherwise, if <i>property</i> is a <tref>keyword</tref>
continue to the next <i>property</i>-<i>values</i> pair.</li>
+ <li>Otherwise, if <i>property</i> is a <tref>blank node identifier</tref> and
+ <code class="idlMemberName"><a href="#widl-JsonLdOptions-produceGeneralizedRdf">produceGeneralizedRdf</a></code>
+ is not <code>true</code>, continue to the next <i>property</i>-<i>values</i> pair.</li>
<li>Otherwise, <i>property</i> is an <tref>IRI</tref> or
<tref>blank node identifier</tref>. For each <i>item</i>
in <i>values</i>:
@@ -3989,6 +3995,12 @@
different optimizations. Developers MUST NOT define modes beginning
with <code>json-ld</code> as they are reserved for future versions
of this specification.</dd>
+ <dt>boolean produceGeneralizedRdf = false</dt>
+ <dd>If set to <code>true</code>, the JSON-LD processor emits <tref title="rdf triple">RDF Triples</tref>
+ having a <tref>blank node</tref> <tref title="rdf predicate">predicate</tref>.
+ If set to <code>false</code>, <tref title="rdf triple">RDF Triples</tref>
+ having a <tref>blank node</tref> <tref title="rdf predicate">predicate</tref>
+ are excluded from output.</dd>
</dl>
</section> <!-- end JsonLdOptions -->