Define default values of JsonLdOptions
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 19 Jul 2012 19:19:59 +0200
changeset 777 46718065533a
parent 776 0bb5011e6233
child 778 62eceab63ea3
Define default values of JsonLdOptions

Unfortunately the used version of ReSpec (although the test at [1] support it) doesn't handle default values correctly so that I had to add them as well in prose.

Furthermore the formatting is wrong: Instead of using h4 headers respec uses h2 headers for WebIDL subsections. This has been fixed in [2] but I think we are using a different version.

[1] http://dev.w3.org/2009/dap/ReSpec.js/test-spec/webidl.html#with-members
[2] https://github.com/darobin/respec/issues/46

This closes #112.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Wed Jul 18 00:04:12 2012 +0300
+++ b/spec/latest/json-ld-api/index.html	Thu Jul 19 19:19:59 2012 +0200
@@ -264,9 +264,9 @@
 <section id='sotd'>
 <p>This document has been under development for over 18 months in the
 JSON for Linking Data Community Group. The document has recently been
-transferred to the RDF Working Group for review, improvement, and publication 
+transferred to the RDF Working Group for review, improvement, and publication
 along the Recommendation track. While this is a First Public Working Draft
-publication, the specification has undergone significant development, review, 
+publication, the specification has undergone significant development, review,
 and changes during the course of the last 18 months and is more mature than
 the First Public Working Draft status implies.
 </p>
@@ -936,22 +936,26 @@
 
     <section>
     <h3>JsonLdOptions</h3>
-    <p>The <a>JsonLdOptions</a> type is used to convert a set of options to an interface method.</p>
-    <dl title="typedef object JsonLdOptions" class="idl">
-      <dt><a>URL</a> base</dt>
+    <p>The <a>JsonLdOptions</a> type is used to pass various options to the <a>JsonLdProcessor</a> methods.</p>
+    <dl title="dictionary JsonLdOptions" class="idl">
+      <dt>URL? base</dt>
       <dd>The Base IRI to use when expanding the document. This overrides the value of
-        <em>input</em> if it is a <a>URL</a> or if it is a <code>object</code> or <code>object[]</code>.</dd>
-      <dt>boolean optimize</dt>
+        <em>input</em> if it is a <a>URL</a>. If not specified and <em>input</em> is not
+        an <a>URL</a>, the base IRI defaults to the current document IRI if in a browser context,
+        or the empty string if there is no document context.</dd>
+      <dt>boolean optimize = false</dt>
       <dd>If set to <code>true</code>, the JSON-LD processor is allowed to
         optimize the output of the <a href="#compaction-algorithm">Compaction Algorithm</a>
         to produce even compacter representations. The algorithm for compaction
         optimization is beyond the scope of this specification and thus
         not defined. Consequently, different implementations MAY implement
-        different optimization algorithms.</dd>
-      <dt>boolean noType</dt>
+        different optimization algorithms.<br>
+        The default value is <code>false</code>.</dd>
+      <dt>boolean noType = false</dt>
       <dd>If set to <code>true</code>, the JSON-LD processor will not use the
         <code>@type</code> property when generating the output, and will use the
-        expanded <code>rdf:type</code> IRI as the property instead of <code>@type</code>.</dd>
+        expanded <code>rdf:type</code> IRI as the property instead of <code>@type</code>.<br>
+        The default value is <code>false</code>.</dd>
     </dl>
     </section>
 
@@ -2271,15 +2275,15 @@
 <section class="appendix">
 <h1>Acknowledgements</h1>
 
-<p>A large amount of thanks goes out to the JSON-LD Community Group 
+<p>A large amount of thanks goes out to the JSON-LD Community Group
 participants who worked through many of the technical issues on the mailing
-list and the weekly telecons - of special mention are Niklas Lindström, 
+list and the weekly telecons - of special mention are Niklas Lindström,
 François Daoust, and Zdenko 'Denny' Vrandečić.
 The editors would like to thank Mark Birbeck, who provided a great deal of
 the initial push behind the JSON-LD work via his work on RDFj.
 The work of Dave Lehn and Mike Johnson are appreciated for reviewing,
 and performing several implementations of the specification. Ian Davis is
-thanked for this work on RDF/JSON. Thanks also to Nathan Rixham, 
+thanked for this work on RDF/JSON. Thanks also to Nathan Rixham,
 Bradley P. Allen,
 Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
 Thibodeau Jr., Olivier Grisel, Josh Mandel, Eric Prud'hommeaux,