diff --git a/index.html b/index.html index 7164c0c5..031632e5 100644 --- a/index.html +++ b/index.html @@ -1052,10 +1052,6 @@

Overview

a remote context. We dereference the remote context and replace context with the value of the @context entry of the top-level object in the retrieved JSON-LD document. - If the result is an HTML document, - we attempt to extract JSON-LD from the first script element - of type application/ld+json;profile=http://www.w3.org/ns/json-ld#context - or application/ld+json, if no context profile exists. If there's no such entry, an invalid remote context has been detected. Otherwise, we process context by recursively using @@ -1167,7 +1163,8 @@

Algorithm

  • Otherwise, dereference context using the LoadDocumentCallback, passing context for url, - and http://www.w3.org/ns/json-ld#context for profile
  • + and http://www.w3.org/ns/json-ld#context for profile + and for requestProfile.
  • If context cannot be dereferenced, or cannot be transformed into the internal representation, a loading remote context failed @@ -1223,7 +1220,8 @@

    Algorithm

  • Dereference import using the LoadDocumentCallback, passing import for url, - and http://www.w3.org/ns/json-ld#context for profile
  • + and http://www.w3.org/ns/json-ld#context for profile + and for requestProfile.
  • If import cannot be dereferenced, or cannot be transformed into the internal representation, a loading remote context failed @@ -5800,7 +5798,7 @@

    LoadDocumentCallback

    The URL of the remote document or context to load.
    options
    A set of options to determine - the behavior of the callback. See .
    + the behavior of the callback. See .

    The following algorithm describes the default callback and places @@ -5820,7 +5818,9 @@

    LoadDocumentCallback

    Processors MAY include other media types using a +json suffix as defined in [[RFC6839]].

    -

    A full Processor MUST include text/html at any preference level.

  • +

    A full Processor MUST include text/html at any preference level, + unless requestProfile is `http://www.w3.org/ns/json-ld#context`.

    +
  • Set documentUrl to the location of the retrieved resource considering redirections (exclusive of HTTP status 303 "See Other" redirects as discussed in [[?cooluris]]).
  • @@ -6344,10 +6344,6 @@

    Changes since JSON-LD Community Group Final Report

  • Term definitions with keys which are of the form of a compact IRI or absolute IRI MUST NOT expand to an IRI other than the expansion of the key itself.
  • Define different processor modes: pure JSON Processor, event-based JSON processor, and full Processor.
  • -
  • For a full Processor, if a retrieved context URL returns an HTML document, the first script element - of type application/ld+json;profile=http://www.w3.org/ns/json-ld#context, - or application/ld+json is used as the context for further processing. - This allows a mechanism for documenting the content of a context using HTML.
  • Consolidate RemoteDocument processing into the LoadDocumentCallback including variations on HTML processing.
  • The IRI compaction algorithm may generate an error if the result is an diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index 2d619185..14caa764 100644 --- a/tests/expand-manifest.jsonld +++ b/tests/expand-manifest.jsonld @@ -1684,45 +1684,6 @@ "input": "expand/h022-in.html#second", "expect": "expand/h022-out.jsonld", "option": {"specVersion": "json-ld-1.1"} - }, { - "@id": "#thc01", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands document using an HTML context", - "purpose": "Tests extracting a context from an HTML document.", - "input": "expand/hc01-in.jsonld", - "expect": "expand/hc01-out.jsonld", - "option": {"specVersion": "json-ld-1.1"} - }, { - "@id": "#thc02", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands document using an HTML context with a fragment identifier", - "purpose": "Tests extracting a context from an HTML document with script identified by fragment identifier.", - "input": "expand/hc02-in.jsonld", - "expect": "expand/hc02-out.jsonld", - "option": {"specVersion": "json-ld-1.1"} - }, { - "@id": "#thc03", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands document using an HTML context with preference to context profile", - "purpose": "Tests extracting a context from an HTML document, skipping other contexts.", - "input": "expand/hc03-in.jsonld", - "expect": "expand/hc03-out.jsonld", - "option": {"specVersion": "json-ld-1.1"} - }, { - "@id": "#thc04", - "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], - "name": "Expands document using an HTML context with expandContext", - "purpose": "Tests extracting a context from an HTML document, using expandContext API option.", - "input": "expand/hc04-in.jsonld", - "expect": "expand/hc04-out.jsonld", - "option": {"expandContext": "hc04-context.html", "specVersion": "json-ld-1.1"} - }, { - "@id": "#thc05", - "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], - "name": "Errors if given an HTML file for a context where no context script element is found", - "purpose": "Verifies that an exception is raised on expansion when a remote context is an HTML file but does not contain a script element which is an object containing @context", - "input": "expand/hc05-in.jsonld", - "expect": "invalid remote context" }, { "@id": "#tin01", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], diff --git a/tests/expand/hc01-context.html b/tests/expand/hc01-context.html deleted file mode 100644 index dbce5571..00000000 --- a/tests/expand/hc01-context.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tests/expand/hc01-in.jsonld b/tests/expand/hc01-in.jsonld deleted file mode 100644 index 5cc87215..00000000 --- a/tests/expand/hc01-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "hc01-context.html", - "@id": "http://example.com/id1", - "@type": "t1", - "term1": "v1", - "term2": {"@value": "v2", "@type": "t2"}, - "term3": {"@value": "v3", "@language": "en"}, - "term4": 4, - "term5": [50, 51] -} diff --git a/tests/expand/hc01-out.jsonld b/tests/expand/hc01-out.jsonld deleted file mode 100644 index cc8e658e..00000000 --- a/tests/expand/hc01-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "http://example.com/id1", - "@type": ["http://example.com/t1"], - "http://example.com/term1": [{"@value": "v1"}], - "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}], - "http://example.com/term3": [{"@value": "v3", "@language": "en"}], - "http://example.com/term4": [{"@value": 4}], - "http://example.com/term5": [{"@value": 50}, {"@value": 51}] -}] \ No newline at end of file diff --git a/tests/expand/hc02-context.html b/tests/expand/hc02-context.html deleted file mode 100644 index a17483b7..00000000 --- a/tests/expand/hc02-context.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/tests/expand/hc02-in.jsonld b/tests/expand/hc02-in.jsonld deleted file mode 100644 index 2eb65be9..00000000 --- a/tests/expand/hc02-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "hc02-context.html#context", - "@id": "http://example.com/id1", - "@type": "t1", - "term1": "v1", - "term2": {"@value": "v2", "@type": "t2"}, - "term3": {"@value": "v3", "@language": "en"}, - "term4": 4, - "term5": [50, 51] -} diff --git a/tests/expand/hc02-out.jsonld b/tests/expand/hc02-out.jsonld deleted file mode 100644 index cc8e658e..00000000 --- a/tests/expand/hc02-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "http://example.com/id1", - "@type": ["http://example.com/t1"], - "http://example.com/term1": [{"@value": "v1"}], - "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}], - "http://example.com/term3": [{"@value": "v3", "@language": "en"}], - "http://example.com/term4": [{"@value": 4}], - "http://example.com/term5": [{"@value": 50}, {"@value": 51}] -}] \ No newline at end of file diff --git a/tests/expand/hc03-context.html b/tests/expand/hc03-context.html deleted file mode 100644 index 58c70b17..00000000 --- a/tests/expand/hc03-context.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/tests/expand/hc03-in.jsonld b/tests/expand/hc03-in.jsonld deleted file mode 100644 index c3dc5f26..00000000 --- a/tests/expand/hc03-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "hc03-context.html#context", - "@id": "http://example.com/id1", - "@type": "t1", - "term1": "v1", - "term2": {"@value": "v2", "@type": "t2"}, - "term3": {"@value": "v3", "@language": "en"}, - "term4": 4, - "term5": [50, 51] -} diff --git a/tests/expand/hc03-out.jsonld b/tests/expand/hc03-out.jsonld deleted file mode 100644 index cc8e658e..00000000 --- a/tests/expand/hc03-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "http://example.com/id1", - "@type": ["http://example.com/t1"], - "http://example.com/term1": [{"@value": "v1"}], - "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}], - "http://example.com/term3": [{"@value": "v3", "@language": "en"}], - "http://example.com/term4": [{"@value": 4}], - "http://example.com/term5": [{"@value": 50}, {"@value": 51}] -}] \ No newline at end of file diff --git a/tests/expand/hc04-context.html b/tests/expand/hc04-context.html deleted file mode 100644 index 58c70b17..00000000 --- a/tests/expand/hc04-context.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/tests/expand/hc04-in.jsonld b/tests/expand/hc04-in.jsonld deleted file mode 100644 index 5c5741fd..00000000 --- a/tests/expand/hc04-in.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@id": "http://example.com/id1", - "@type": "t1", - "term1": "v1", - "term2": {"@value": "v2", "@type": "t2"}, - "term3": {"@value": "v3", "@language": "en"}, - "term4": 4, - "term5": [50, 51] -} diff --git a/tests/expand/hc04-out.jsonld b/tests/expand/hc04-out.jsonld deleted file mode 100644 index cc8e658e..00000000 --- a/tests/expand/hc04-out.jsonld +++ /dev/null @@ -1,9 +0,0 @@ -[{ - "@id": "http://example.com/id1", - "@type": ["http://example.com/t1"], - "http://example.com/term1": [{"@value": "v1"}], - "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}], - "http://example.com/term3": [{"@value": "v3", "@language": "en"}], - "http://example.com/term4": [{"@value": 4}], - "http://example.com/term5": [{"@value": 50}, {"@value": 51}] -}] \ No newline at end of file diff --git a/tests/expand/hc05-context.html b/tests/expand/hc05-context.html deleted file mode 100644 index 695ba830..00000000 --- a/tests/expand/hc05-context.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/tests/expand/hc05-in.jsonld b/tests/expand/hc05-in.jsonld deleted file mode 100644 index 74838954..00000000 --- a/tests/expand/hc05-in.jsonld +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "hc05-context.html", - "@id": "http://example.com/id1", - "@type": "t1", - "term1": "v1", - "term2": {"@value": "v2", "@type": "t2"}, - "term3": {"@value": "v3", "@language": "en"}, - "term4": 4, - "term5": [50, 51] -}