Strip rdfs:comment and replace interal whitespace with a single space when turning Turtle into JSON-LD.
--- a/test-suite/vocab.html Sat Aug 24 16:34:34 2013 -0700
+++ b/test-suite/vocab.html Sun Aug 25 10:45:49 2013 -0700
@@ -129,104 +129,31 @@
<section class='offset2 span8'>
<dl>
<dt about='jld:CompactTest' property='rdfs:label' typeof='rdfs:Class'>Compact Evaluation Test</dt>
- <dd about='jld:CompactTest' property='rdfs:comment'>
- <p>A <code>CompactTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the
- <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options">compact</a>
- method with the input argument from <code>mf:action</code> referencing a JSON-LD file in expanded form, context from <code>:input</code> and optional options
- from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p>
- </dd>
+ <dd about='jld:CompactTest' property='rdfs:comment'><p>A <code>CompactTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options">compact</a> method with the input argument from <code>mf:action</code> referencing a JSON-LD file in expanded form, context from <code>:input</code> and optional options from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p></dd>
<dt about='jld:ExpandTest' property='rdfs:label' typeof='rdfs:Class'>Expand Evaluation Test</dt>
- <dd about='jld:ExpandTest' property='rdfs:comment'>
- <p>A <code>ExpandTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the
- <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options">expand</a>
- method with the input argument from mf:action referencing a JSON-LD file, and optional options
- from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p>
- </dd>
+ <dd about='jld:ExpandTest' property='rdfs:comment'><p>A <code>ExpandTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options">expand</a> method with the input argument from mf:action referencing a JSON-LD file, and optional options from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p></dd>
<dt about='jld:FlattenTest' property='rdfs:label' typeof='rdfs:Class'>Flatten Evaluation Test</dt>
- <dd about='jld:FlattenTest' property='rdfs:comment'>
- <p>A <code>FlattenTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the flatten method
- (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)
- with the input argument from mf:action referencing a JSON-LD file, optional context from <code>:input</code> and optional options
- from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p>
- </dd>
+ <dd about='jld:FlattenTest' property='rdfs:comment'><p>A <code>FlattenTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the flatten method (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options) with the input argument from mf:action referencing a JSON-LD file, optional context from <code>:input</code> and optional options from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p></dd>
<dt about='jld:FrameTest' property='rdfs:label' typeof='rdfs:Class'>Frame Evaluation Test</dt>
- <dd about='jld:FrameTest' property='rdfs:comment'>
- <p>A <code>FrameTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the
- <a href="http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options">frame</a>
- method with the input argument from <code>mf:action</code> referencing a JSON-LD file, frame from <code>:input</code> and optional options
- from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p>
- </dd>
+ <dd about='jld:FrameTest' property='rdfs:comment'><p>A <code>FrameTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the <a href="http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options">frame</a> method with the input argument from <code>mf:action</code> referencing a JSON-LD file, frame from <code>:input</code> and optional options from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p></dd>
<dt about='jld:FromRDFTest' property='rdfs:label' typeof='rdfs:Class'>From RDF Evaluation Test</dt>
- <dd about='jld:FromRDFTest' property='rdfs:comment'>
- <p>A <code>FromRDFTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the
- <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion">RDF to Object Conversion</a>
- algorithm with the input argument from <code>mf:action</code> referencing an N-Quads file and optional options
- from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p>
- </dd>
+ <dd about='jld:FromRDFTest' property='rdfs:comment'><p>A <code>FromRDFTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion">RDF to Object Conversion</a> algorithm with the input argument from <code>mf:action</code> referencing an N-Quads file and optional options from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> MUST be compared using JSON object comparison with the processor output.</p></dd>
<dt about='jld:NegativeSyntaxTest' property='rdfs:label' typeof='rdfs:Class'>Negative Syntax Test</dt>
- <dd about='jld:NegativeSyntaxTest' property='rdfs:comment'>
- <p>A type of test specifically for syntax testing.
- Syntax tests are not required to have an associated result, only an action.
- Negative syntax tests are tests of which the result should be a parser error.</p>
- </dd>
+ <dd about='jld:NegativeSyntaxTest' property='rdfs:comment'><p>A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error.</p></dd>
<dt about='jld:NormalizeTest' property='rdfs:label' typeof='rdfs:Class'>Normalization Evaluation Test</dt>
- <dd about='jld:NormalizeTest' property='rdfs:comment'>
- <p>A <code>NormalizeTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the
- <a href="http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm">Normalization</a>
- algorithmwith the input argument from mf:action referencing an JSON-LD file and optional options
- from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order
- and MUST be compared using string comparison.</p>
- </dd>
+ <dd about='jld:NormalizeTest' property='rdfs:comment'><p>A <code>NormalizeTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the <a href="http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm">Normalization</a> algorithmwith the input argument from mf:action referencing an JSON-LD file and optional options from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order and MUST be compared using string comparison.</p></dd>
<dt about='jld:NegativeEvaluationTest' property='rdfs:label' typeof='rdfs:Class'>Positive Evaluation Test</dt>
- <dd about='jld:NegativeEvaluationTest' property='rdfs:comment'>
- <p>A Negative Evaluation test is successful when the result of processing
- the input file specified as <code>mf:action</code> results in the error identified
- by the literal value of <code>mf:result</code>. The specifics of invoking test, including
- the interpretation of options (<code>:option</code>) and other input files are
- specified through another class.</p>
- </dd>
+ <dd about='jld:NegativeEvaluationTest' property='rdfs:comment'><p>A Negative Evaluation test is successful when the result of processing the input file specified as <code>mf:action</code> results in the error identified by the literal value of <code>mf:result</code>. The specifics of invoking test, including the interpretation of options (<code>:option</code>) and other input files are specified through another class.</p></dd>
<dt about='jld:PositiveEvaluationTest' property='rdfs:label' typeof='rdfs:Class'>Positive Evaluation Test</dt>
- <dd about='jld:PositiveEvaluationTest' property='rdfs:comment'>
- <p>A Positive Evaluation test is successful when the result of processing
- the input file specified as <code>mf:action</code> exactly matches the output file
- specified as <code>mf:result</code> using the comparison defined in
- another class. The specifics of invoking test, including
- the interpretation of options (:option) and other input files are
- specified through another class.</p>
- </dd>
+ <dd about='jld:PositiveEvaluationTest' property='rdfs:comment'><p>A Positive Evaluation test is successful when the result of processing the input file specified as <code>mf:action</code> exactly matches the output file specified as <code>mf:result</code> using the comparison defined in another class. The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class.</p></dd>
<dt about='jld:PositiveSyntaxTest' property='rdfs:label' typeof='rdfs:Class'>Positive Syntax Test</dt>
- <dd about='jld:PositiveSyntaxTest' property='rdfs:comment'>
- <p>A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action.</p>
- </dd>
+ <dd about='jld:PositiveSyntaxTest' property='rdfs:comment'><p>A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action.</p></dd>
<dt about='jld:Option' property='rdfs:label' typeof='rdfs:Class'>Processor Options</dt>
- <dd about='jld:Option' property='rdfs:comment'>
- <p>Options passed to the test runner to affect invocation of the appropriate API method.</p>
- </dd>
+ <dd about='jld:Option' property='rdfs:comment'><p>Options passed to the test runner to affect invocation of the appropriate API method.</p></dd>
<dt about='jld:Test' property='rdfs:label' typeof='rdfs:Class'>Superclass of all JSON-LD tests</dt>
- <dd about='jld:Test' property='rdfs:comment'>
- <p>All JSON-LD tests have an input file referenced using <code>mf:action</code>.
- Positive and Negative Evaluation Tests also have a result file
- referenced using <code>mf:result</code>. Other tests may take different inputs
- and options as defined for each test class. Tests should be run
- with the processingMode option set to "json-ld-1.0", unless specified
- explicitly as a test option.</p>
- </dd>
+ <dd about='jld:Test' property='rdfs:comment'><p>All JSON-LD tests have an input file referenced using <code>mf:action</code>. Positive and Negative Evaluation Tests also have a result file referenced using <code>mf:result</code>. Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to "json-ld-1.0", unless specified explicitly as a test option.</p></dd>
<dt about='jld:ToRDFTest' property='rdfs:label' typeof='rdfs:Class'>To RDF Evaluation Test</dt>
- <dd about='jld:ToRDFTest' property='rdfs:comment'>
- <p>A <code>ToRDFTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>,
- <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the
- <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm">Deserialize JSON-LD to RDF algorithm</a>
- with the input argument from <code>mf:action</code> referencing an JSON-LD file and optional options
- from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> are N-Quads serialized in lexographical order
- and MUST be compared either string comparison or Dataset as defined
- in <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism">RDF11-CONCEPTS</a>.</p>
- </dd>
+ <dd about='jld:ToRDFTest' property='rdfs:comment'><p>A <code>ToRDFTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>. Tests are run using the <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm">Deserialize JSON-LD to RDF algorithm</a> with the input argument from <code>mf:action</code> referencing an JSON-LD file and optional options from <code>:option</code>. The expected results for a <code>PositiveEvaluationTest</code> are N-Quads serialized in lexographical order and MUST be compared either string comparison or Dataset as defined in <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism">RDF11-CONCEPTS</a>.</p></dd>
</dl>
</section>
</div>
@@ -240,9 +167,7 @@
<dl>
<dt about='jld:base' property='rdfs:label' typeof='rdfs:Property'>base</dt>
<dd about='jld:base'>
- <span property='rdfs:comment'>
- <p>The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI.</p>
- </span>
+ <span property='rdfs:comment'><p>The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI.</p></span>
<div>
<strong>
domain:
@@ -258,9 +183,7 @@
</dd>
<dt about='jld:compactArrays' property='rdfs:label' typeof='rdfs:Property'>compact arrays</dt>
<dd about='jld:compactArrays'>
- <span property='rdfs:comment'>
- <p>If set to <code>true</code>, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element.</p>
- </span>
+ <span property='rdfs:comment'><p>If set to <code>true</code>, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element.</p></span>
<div>
<strong>
domain:
@@ -276,9 +199,7 @@
</dd>
<dt about='jld:expandContext' property='rdfs:label' typeof='rdfs:Property'>expand context</dt>
<dd about='jld:expandContext'>
- <span property='rdfs:comment'>
- <p>A context that is used to initialize the active context when expanding a document.</p>
- </span>
+ <span property='rdfs:comment'><p>A context that is used to initialize the active context when expanding a document.</p></span>
<div>
<strong>
domain:
@@ -294,9 +215,7 @@
</dd>
<dt about='jld:input' property='rdfs:label' typeof='rdfs:Property'>input</dt>
<dd about='jld:input'>
- <span property='rdfs:comment'>
- <p>Secondary input file</p>
- </span>
+ <span property='rdfs:comment'><p>Secondary input file</p></span>
<div>
<strong>
domain:
@@ -312,9 +231,7 @@
</dd>
<dt about='jld:option' property='rdfs:label' typeof='rdfs:Property'>option</dt>
<dd about='jld:option'>
- <span property='rdfs:comment'>
- <p>Options affecting processing</p>
- </span>
+ <span property='rdfs:comment'><p>Options affecting processing</p></span>
<div>
<strong>
domain:
@@ -330,15 +247,7 @@
</dd>
<dt about='jld:processingMode' property='rdfs:label' typeof='rdfs:Property'>processing mode</dt>
<dd about='jld:processingMode'>
- <span property='rdfs:comment'>
- <p>If set to "json-ld-1.0", the JSON-LD processor must produce exactly the same results as
- the algorithms defined in this specification.
- If set to another value, the JSON-LD processor is allowed to extend or modify
- the algorithms defined in this specification to enable application-specific optimizations.
- The definition of such optimizations is beyond the scope of this specification and thus not defined.
- Consequently, different implementations may implement different optimizations.
- Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.</p>
- </span>
+ <span property='rdfs:comment'><p>If set to "json-ld-1.0", the JSON-LD processor must produce exactly the same results as the algorithms defined in this specification. If set to another value, the JSON-LD processor is allowed to extend or modify the algorithms defined in this specification to enable application-specific optimizations. The definition of such optimizations is beyond the scope of this specification and thus not defined. Consequently, different implementations may implement different optimizations. Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.</p></span>
<div>
<strong>
domain:
@@ -354,9 +263,7 @@
</dd>
<dt about='jld:produceGeneralizedRDF' property='rdfs:label' typeof='rdfs:Property'>produce generalized RDF</dt>
<dd about='jld:produceGeneralizedRDF'>
- <span property='rdfs:comment'>
- <p>Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output.</p>
- </span>
+ <span property='rdfs:comment'><p>Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output.</p></span>
<div>
<strong>
domain:
@@ -372,12 +279,7 @@
</dd>
<dt about='jld:useDocumentLoader' property='rdfs:label' typeof='rdfs:Property'>use document loader</dt>
<dd about='jld:useDocumentLoader'>
- <span property='rdfs:comment'>
- <p>Test runners must implement a callback method with a method signature as defined
- in <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#idl-def-LoadDocumentCallback">LoadDocumentCallback</a>.
- Specifying this option requires the test runner to provide this callback to the appropriate
- API method using the <code>documentLoader</code> option.</p>
- </span>
+ <span property='rdfs:comment'><p>Test runners must implement a callback method with a method signature as defined in <a href="http://json-ld.org/spec/latest/json-ld-api/index.html#idl-def-LoadDocumentCallback">LoadDocumentCallback</a>. Specifying this option requires the test runner to provide this callback to the appropriate API method using the <code>documentLoader</code> option.</p></span>
<div>
<strong>
domain:
@@ -393,12 +295,7 @@
</dd>
<dt about='jld:useNativeTypes' property='rdfs:label' typeof='rdfs:Property'>use native types</dt>
<dd about='jld:useNativeTypes'>
- <span property='rdfs:comment'>
- <p>If the <em>use native types</em> flag is set to <code>true</code>, RDF literals with a datatype IRI tha
- equals <code>xsd:integer</code> or <code>xsd:double</code> are converted to a JSON numbers and RDF literals
- with a datatype IRI that equals <code>xsd:boolean</code> are converted to <code>true</code> or <code>false</code> based
- on their lexical form.</p>
- </span>
+ <span property='rdfs:comment'><p>If the <em>use native types</em> flag is set to <code>true</code>, RDF literals with a datatype IRI tha equals <code>xsd:integer</code> or <code>xsd:double</code> are converted to a JSON numbers and RDF literals with a datatype IRI that equals <code>xsd:boolean</code> are converted to <code>true</code> or <code>false</code> based on their lexical form.</p></span>
<div>
<strong>
domain:
--- a/test-suite/vocab.jsonld Sat Aug 24 16:34:34 2013 -0700
+++ b/test-suite/vocab.jsonld Sun Aug 25 10:45:49 2013 -0700
@@ -36,51 +36,51 @@
{
"@id": "jld:CompactTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `CompactTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [compact](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)\n method with the input argument from `mf:action` referencing a JSON-LD file in expanded form, context from `:input` and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:comment": "A `CompactTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the [compact](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options) method with the input argument from `mf:action` referencing a JSON-LD file in expanded form, context from `:input` and optional options from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.",
"rdfs:label": "Compact Evaluation Test"
},
{
"@id": "jld:ExpandTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `ExpandTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [expand](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options)\n method with the input argument from mf:action referencing a JSON-LD file, and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:comment": "A `ExpandTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the [expand](http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options) method with the input argument from mf:action referencing a JSON-LD file, and optional options from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.",
"rdfs:label": "Expand Evaluation Test"
},
{
"@id": "jld:FlattenTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `FlattenTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the flatten method\n (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options)\n with the input argument from mf:action referencing a JSON-LD file, optional context from `:input` and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:comment": "A `FlattenTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the flatten method (http://json-ld.org/spec/latest/json-ld-api/index.html#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options) with the input argument from mf:action referencing a JSON-LD file, optional context from `:input` and optional options from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.",
"rdfs:label": "Flatten Evaluation Test"
},
{
"@id": "jld:FrameTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `FrameTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [frame](http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options)\n method with the input argument from `mf:action` referencing a JSON-LD file, frame from `:input` and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:comment": "A `FrameTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the [frame](http://json-ld.org/spec/latest/json-ld-framing/#widl-JsonLdProcessor-frame-void-object-or-object---or-IRI-input-object-or-IRI-frame-JsonLdCallback-callback-JsonLdOptions-options) method with the input argument from `mf:action` referencing a JSON-LD file, frame from `:input` and optional options from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.",
"rdfs:label": "Frame Evaluation Test"
},
{
"@id": "jld:FromRDFTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `FromRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [RDF to Object Conversion](http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion)\n algorithm with the input argument from `mf:action` referencing an N-Quads file and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.\n ",
+ "rdfs:comment": "A `FromRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the [RDF to Object Conversion](http://json-ld.org/spec/latest/json-ld-api/index.html#rdf-to-object-conversion) algorithm with the input argument from `mf:action` referencing an N-Quads file and optional options from `:option`. The expected results for a `PositiveEvaluationTest` MUST be compared using JSON object comparison with the processor output.",
"rdfs:label": "From RDF Evaluation Test"
},
{
"@id": "jld:NegativeEvaluationTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A Negative Evaluation test is successful when the result of processing\n the input file specified as `mf:action` results in the error identified\n by the literal value of `mf:result`. The specifics of invoking test, including\n the interpretation of options (`:option`) and other input files are\n specified through another class.\n ",
+ "rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` results in the error identified by the literal value of `mf:result`. The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class.",
"rdfs:label": "Positive Evaluation Test",
"rdfs:subClassOf": "jld:Test"
},
{
"@id": "jld:NegativeSyntaxTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A type of test specifically for syntax testing.\n Syntax tests are not required to have an associated result, only an action.\n Negative syntax tests are tests of which the result should be a parser error.\n ",
+ "rdfs:comment": "A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error.",
"rdfs:label": "Negative Syntax Test",
"rdfs:subClassOf": "jld:Test"
},
{
"@id": "jld:NormalizeTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `NormalizeTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [Normalization](http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm)\n algorithmwith the input argument from mf:action referencing an JSON-LD file and optional options\n from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order\n and MUST be compared using string comparison.\n ",
+ "rdfs:comment": "A `NormalizeTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the [Normalization](http://json-ld.org/spec/latest/rdf-graph-normalization/#normalization-algorithm) algorithmwith the input argument from mf:action referencing an JSON-LD file and optional options from :option. The expected results for a PositiveEvaluationTest are N-Quads serialized in lexographical order and MUST be compared using string comparison.",
"rdfs:label": "Normalization Evaluation Test"
},
{
@@ -92,7 +92,7 @@
{
"@id": "jld:PositiveEvaluationTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A Positive Evaluation test is successful when the result of processing\n the input file specified as `mf:action` exactly matches the output file\n specified as `mf:result` using the comparison defined in\n another class. The specifics of invoking test, including\n the interpretation of options (:option) and other input files are\n specified through another class.\n ",
+ "rdfs:comment": "A Positive Evaluation test is successful when the result of processing the input file specified as `mf:action` exactly matches the output file specified as `mf:result` using the comparison defined in another class. The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class.",
"rdfs:label": "Positive Evaluation Test",
"rdfs:subClassOf": "jld:Test"
},
@@ -106,13 +106,13 @@
{
"@id": "jld:Test",
"@type": "rdfs:Class",
- "rdfs:comment": "\n All JSON-LD tests have an input file referenced using `mf:action`.\n Positive and Negative Evaluation Tests also have a result file\n referenced using `mf:result`. Other tests may take different inputs\n and options as defined for each test class. Tests should be run\n with the processingMode option set to \"json-ld-1.0\", unless specified\n explicitly as a test option.\n ",
+ "rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action`. Positive and Negative Evaluation Tests also have a result file referenced using `mf:result`. Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.0\", unless specified explicitly as a test option.",
"rdfs:label": "Superclass of all JSON-LD tests"
},
{
"@id": "jld:ToRDFTest",
"@type": "rdfs:Class",
- "rdfs:comment": "\n A `ToRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`,\n `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the\n [Deserialize JSON-LD to RDF algorithm](http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm)\n with the input argument from `mf:action` referencing an JSON-LD file and optional options\n from `:option`. The expected results for a `PositiveEvaluationTest` are N-Quads serialized in lexographical order\n and MUST be compared either string comparison or Dataset as defined\n in [RDF11-CONCEPTS](http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism).\n ",
+ "rdfs:comment": "A `ToRDFTest` modifies either a `PositiveEvaluationTest`, `NegativeEvaluationTest`, `PositiveSyntaxTest` or `NegativeSyntaxTest`. Tests are run using the [Deserialize JSON-LD to RDF algorithm](http://json-ld.org/spec/latest/json-ld-api/index.html#deserialize-json-ld-to-rdf-algorithm) with the input argument from `mf:action` referencing an JSON-LD file and optional options from `:option`. The expected results for a `PositiveEvaluationTest` are N-Quads serialized in lexographical order and MUST be compared either string comparison or Dataset as defined in [RDF11-CONCEPTS](http://www.w3.org/TR/rdf11-concepts/#section-dataset-isomorphism).",
"rdfs:label": "To RDF Evaluation Test"
},
{
@@ -158,7 +158,7 @@
{
"@id": "jld:processingMode",
"@type": "rdfs:Property",
- "rdfs:comment": "\n If set to \"json-ld-1.0\", the JSON-LD processor must produce exactly the same results as\n the algorithms defined in this specification.\n If set to another value, the JSON-LD processor is allowed to extend or modify\n the algorithms defined in this specification to enable application-specific optimizations.\n The definition of such optimizations is beyond the scope of this specification and thus not defined.\n Consequently, different implementations may implement different optimizations.\n Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.\n ",
+ "rdfs:comment": "If set to \"json-ld-1.0\", the JSON-LD processor must produce exactly the same results as the algorithms defined in this specification. If set to another value, the JSON-LD processor is allowed to extend or modify the algorithms defined in this specification to enable application-specific optimizations. The definition of such optimizations is beyond the scope of this specification and thus not defined. Consequently, different implementations may implement different optimizations. Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.",
"rdfs:domain": "jld:Test",
"rdfs:label": "processing mode",
"rdfs:range": "xsd:string"
@@ -174,7 +174,7 @@
{
"@id": "jld:useDocumentLoader",
"@type": "rdfs:Property",
- "rdfs:comment": "\n Test runners must implement a callback method with a method signature as defined\n in [LoadDocumentCallback](http://json-ld.org/spec/latest/json-ld-api/index.html#idl-def-LoadDocumentCallback).\n Specifying this option requires the test runner to provide this callback to the appropriate\n API method using the `documentLoader` option.\n ",
+ "rdfs:comment": "Test runners must implement a callback method with a method signature as defined in [LoadDocumentCallback](http://json-ld.org/spec/latest/json-ld-api/index.html#idl-def-LoadDocumentCallback). Specifying this option requires the test runner to provide this callback to the appropriate API method using the `documentLoader` option.",
"rdfs:domain": "jld:Test",
"rdfs:label": "use document loader",
"rdfs:range": "xsd:boolean"
@@ -182,7 +182,7 @@
{
"@id": "jld:useNativeTypes",
"@type": "rdfs:Property",
- "rdfs:comment": "\n If the _use native types_ flag is set to `true`, RDF literals with a datatype IRI tha\n equals `xsd:integer` or `xsd:double` are converted to a JSON numbers and RDF literals\n with a datatype IRI that equals `xsd:boolean` are converted to `true` or `false` based\n on their lexical form.\n ",
+ "rdfs:comment": "If the _use native types_ flag is set to `true`, RDF literals with a datatype IRI tha equals `xsd:integer` or `xsd:double` are converted to a JSON numbers and RDF literals with a datatype IRI that equals `xsd:boolean` are converted to `true` or `false` based on their lexical form.",
"rdfs:domain": "jld:FromRDFTest",
"rdfs:label": "use native types",
"rdfs:range": "xsd:boolean"
--- a/test-suite/vocab_gen.rb Sat Aug 24 16:34:34 2013 -0700
+++ b/test-suite/vocab_gen.rb Sun Aug 25 10:45:49 2013 -0700
@@ -10,6 +10,11 @@
File.open("vocab.jsonld", "w") do |f|
r = RDF::Repository.load("vocab.ttl")
JSON::LD::API.fromRDF(r) do |expanded|
+ # Remove leading/trailing and multiple whitespace from rdf:comments
+ expanded.each do |o|
+ c = o[RDF::RDFS.comment.to_s].first['@value']
+ o[RDF::RDFS.comment.to_s].first['@value'] = c.strip.gsub(/\s+/m, ' ')
+ end
JSON::LD::API.compact(expanded, File.open("vocab_context.jsonld")) do |compacted|
# Create vocab.jsonld
f.write(compacted.to_json(JSON::LD::JSON_STATE))
--- a/test-suite/vocab_template.haml Sat Aug 24 16:34:34 2013 -0700
+++ b/test-suite/vocab_template.haml Sun Aug 25 10:45:49 2013 -0700
@@ -89,7 +89,7 @@
%dl
- classes.each do |cls|
%dt{:about => cls['@id'], :typeof => cls['@type'], :property => "rdfs:label"}<~cls["rdfs:label"]
- %dd{:about => cls['@id'], :property => "rdfs:comment"}
+ %dd{:about => cls['@id'], :property => "rdfs:comment"}<
:markdown
#{cls["rdfs:comment"].to_s.gsub(/^\s+/, '')}
%div.row
@@ -101,7 +101,7 @@
- properties.each do |prop|
%dt{:about => prop['@id'], :typeof => prop['@type'], :property => "rdfs:label"}<~prop["rdfs:label"]
%dd{:about => prop['@id']}
- %span{:property => "rdfs:comment"}
+ %span{:property => "rdfs:comment"}<
:markdown
#{prop["rdfs:comment"].to_s.gsub(/^\s+/, '')}
- if prop["rdfs:domain"]