From 48329229e3fc0a0e8388896d9cf6508185af0b26 Mon Sep 17 00:00:00 2001
From: Markus Lanthaler This specification defines an Application Programming Interface (API)
- and a set of algorithms for programmatic transformations of JSON-LD
- documents. Restructuring data according to the defined transformations
- often dramatically simplifies its usage. This specification defines a set of algorithms for programmatic transformations
+ of JSON-LD documents. Restructuring data according to the defined transformations
+ often dramatically simplifies its usage. Furthermore, this document proposes
+ an Application Programming Interface (API) for developers implementing the
+ specified algorithms. This document is a detailed specification for an Application Programming
- Interface for the JSON-LD syntax. The document is primarily intended for
- the following audiences: This document is a detailed specification of the JSON-LD processing algorithms.
+ The document is primarily intended for the following audiences: To understand the basics in this specification you must first be familiar with
@@ -629,24 +626,15 @@
Introduction
-
-
Conformance
MAY, and OPTIONAL in this specification are to be interpreted as described
in [[!RFC2119]].
There are three classes of products that can claim conformance to this +
There are two classes of products that can claim conformance to this
specification:
A conforming
A conforming json-ld-1.0
- processing mode (for further details, see the
- processingMode
- option of JsonLdOptions).
The algorithms in this specification are generally written with more concern for clarity
- than efficiency. Thus,
base
- option of a This API provides a clean mechanism that enables developers to convert
JSON-LD data into a variety of output formats that are often easier to
- work with. A conformant
The JSON-LD API uses
Note: This feature is - "at risk" and may - be removed or modified heavily from the feature described in this specification - based on reviewer feedback. Please send feedback to - public-rdf-comments@w3.org. - For the current status see - features "at risk" in JSON-LD 1.0
-The JSON-LD API specification currently only refers to the "Promise" interface and does not attempt to provide any details on the specific implementation of Promises. That is, it does not reference whether or not '.then()' must be specified. This is done in order to allow for some implementation flexibility in the event the DOM Promises spec changes. The editors of the WHATWG DOM specification have asserted that the Promise interface is ready to be incorporated into specifications. The issue relates to how to properly refer to a spec living in the WHATWG as a living standard as well as how to ensure that the interface provided by the spec is stable.
-The JsonLdProcessor interface is the high-level programming structure that developers use to access the JSON-LD transformation methods.
-It is important to highlight that conformant
-
It is important to highlight that implementations do not modify the input parameters.
+ If an error is detected, the Promise is
rejected passing a JsonLdError with the corresponding error
code
and processing is stopped.
If the documentLoader
- option is specified, a conformant documentUrl
+ option is specified, it is used to dereference remote documents and contexts.
+ The documentUrl
in the returned RemoteDocument
is used as contextUrl
is used instead of looking at the HTTP Link Header directly. For the sake of simplicity, none of the algorithms
- in this document mention this directly. documentLoader
option.
The JsonLdOptions type is used to pass various options to the @@ -4097,33 +4069,32 @@
json-ld-1.0
, the JSON-LD processor MUST produce
+ json-ld-1.0
, the implementation has to 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
+ 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.Developers can utilize a callback to control how remote documents and contexts are retrieved
- by
Users of an API implementation can utilize a callback to control how remote + documents and contexts are retrieved. This section details the parameters of + that callback and the data structure used to return the retrieved context.
-The LoadDocumentCallback defines a callback that custom document loaders @@ -4134,14 +4105,14 @@
All errors MUST result in the
All errors result in the loading document failed
or multiple context link headers
as described in the next section.
The RemoteDocument type is used by a LoadDocumentCallback @@ -4152,9 +4123,9 @@
http://www.w3.org/ns/json-ld#context
link relation in the
response. If the response's content type is application/ld+json
,
- the HTTP Link Header MUST be ignored. If multiple HTTP Link Headers using
+ the HTTP Link Header is ignored. If multiple HTTP Link Headers using
the http://www.w3.org/ns/json-ld#context
link relation are found,
- the multiple context link headers
.This section describes the datatype definitions used within the @@ -4189,7 +4160,7 @@
The JsonLdErrorCode represents the collection of valid JSON-LD error codes.
diff --git a/spec/latest/respec-w3c-extensions.js b/spec/latest/respec-w3c-extensions.js index b119bf1f7..fa15cfb63 100644 --- a/spec/latest/respec-w3c-extensions.js +++ b/spec/latest/respec-w3c-extensions.js @@ -11,7 +11,7 @@ var localBibliography = { "RFC6906": "Erik Wilde. The 'profile' Link Relation Type. March 2013. Internet RFC 6906. URL: http://www.ietf.org/rfc/rfc6906.txt", "TURTLE": "Eric Prud'hommeaux, Gavin Carothers, Editors. Turtle: Terse RDF Triple Language. 19 February 2013. W3C Candidate Recommendation (work in progress). URL: http://www.w3.org/TR/2013/CR-turtle-20130219/. The latest edition is available at http://www.w3.org/TR/turtle/", "WEBIDL": "Cameron McCormack, Editor. Web IDL. 19 April 2012. W3C Candidate Recommendation (work in progress). URL: http://www.w3.org/TR/2012/CR-WebIDL-20120419/. The latest edition is available at http://www.w3.org/TR/WebIDL/", - "DOM-WHATWG": "Anne van Kesteren, Aryeh Gregor, Ms2ger, Editors. DOM. September 2013. WHATWG Living Standard (work in progress). URL: http://dom.spec.whatwg.org/", + "PROMISES": "Domenic Denicola. Promise Objects. October 2013. (work in progress). URL: http://www.w3.org/2013/10/json-ld-api/snapshot-promises-draft. The latest draft is available at https://github.com/domenic/promises-unwrapping", "RDF11-MT": "Patrick J. Hayes, Peter F. Patel-Schneider, Editors. RDF 1.1 Semantics. 23 July 2013. W3C Last Call Working Draft (work in progress). URL: http://www.w3.org/TR/2013/WD-rdf11-mt-20130723/. The latest edition is available at http://www.w3.org/TR/rdf11-mt/", "RFC6839": "Tony Hansen, Alexey Melnikov. Additional Media Type Structured Syntax Suffixes. January 2013. Internet RFC 6839. URL: http://www.ietf.org/rfc/rfc6839.txt", }; From db07ff2c9687e8c682a04b7eb0c32668690a6b88 Mon Sep 17 00:00:00 2001 From: Markus Lanthaler