Skip to content

Commit 4c26651

Browse files
committed
Add text on handling application/xhtml+xml.
It MAY be added on requests, and MUST be handled in responses. For #244.
1 parent 4b33c52 commit 4c26651

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6314,8 +6314,8 @@ <h3>LoadDocumentCallback</h3>
63146314
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <a data-link-for="JsonLdErrorCode">multiple context link headers</a>
63156315
and processing is terminated.</p>
63166316
<p>Processors MAY transform <var>document</var> to the <a>internal representation</a>.</p>
6317-
<p class="note">The HTTP Link Header is ignored for documents served as <code>application/ld+json</code>
6318-
or <code>text/html</code>.</p>
6317+
<p class="note">The HTTP Link Header is ignored for documents served as <code>application/ld+json</code>,
6318+
<code>text/html</code>, or <code>application/xhtml+xml</code>.</p>
63196319
</li>
63206320
<li>Otherwise, the retrieved document's <a>Content-Type</a> is neither
63216321
<code>application/json</code>,
@@ -6357,7 +6357,8 @@ <h3>LoadDocumentOptions</h3>
63576357
unless a specific <a data-cite="RFC3986#section-3.5">fragment identifier</a> is targeted,
63586358
extracts all encountered <a>JSON-LD script elements</a> using an <a>array</a> form, if necessary.</dd>
63596359
<dt><dfn data-dfn-for="LoadDocumentOptions">profile</dfn></dt>
6360-
<dd>When the resulting <a data-link-for="RemoteDocument">contentType</a> is <code>text/html</code>,
6360+
<dd>When the resulting <a data-link-for="RemoteDocument">contentType</a> is <code>text/html</code>
6361+
or <code>application/xhtml+xml</code>,
63616362
this option determines the profile to use for selecting a <a>JSON-LD script elements</a>.</dd>
63626363
<dt><dfn data-dfn-for="LoadDocumentOptions">requestProfile</dfn></dt>
63636364
<dd>One or more IRIs to use in the request as a <code>profile</code> parameter.
@@ -6419,11 +6420,13 @@ <h3>RemoteDocument</h3>
64196420
<p>This sections describe an extension to the algorithm specified
64206421
in <a>LoadDocumentCallback</a> to support extracting JSON-LD from HTML.</p>
64216422

6422-
<p><a href="#LoadDocumentCallback-step-2">Step 2</a> is updated to add the following: A processor supporting <a>HTML script extraction</a> MUST include <code>text/html</code> at any preference level,
6423+
<p><a href="#LoadDocumentCallback-step-2">Step 2</a> is updated to add the following: A processor supporting <a>HTML script extraction</a> MUST include <code>text/html</code> at any preference level
6424+
and MAY include <code>application/xhtml+xml</code> at any preference level,
64236425
unless <a data-link-for="LoadDocumentOptions">requestProfile</a> is `http://www.w3.org/ns/json-ld#context`.</p>
64246426

64256427
<p>After <a href="#LoadDocumentCallback-step-5">step 5</a>, add the following processing step:
6426-
Otherwise, if the retrieved resource's <a>Content-Type</a> is <code>text/html</code>:</p>
6428+
Otherwise, if the retrieved resource's <a>Content-Type</a> is either <code>text/html</code>
6429+
or <code>application/xhtml+xml</code>:</p>
64276430
<ol>
64286431
<li>Set <var>documentUrl</var> to the <a data-cite="HTML/urls-and-fetching.html#document-base-url">Document Base URL</a>
64296432
of <a data-link-for="LoadDocumentCallback">url</a>, as defined in [[HTML]],
@@ -6909,6 +6912,10 @@ <h2>Changes since Candidate Release of 12 December 2019</h2>
69096912
<a href="#expansion-algorithm">Expansion algorithm</a>
69106913
that duplicate the following step.
69116914
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/243">Issue 243</a>.</li>
6915+
<li>Add `application/xhtml+xml` as an allowed media type in <a href="#process-html" class="sectionRef"></a>,
6916+
in the note in <a href="#loaddocumentcallback" class="sectionRef"></a>,
6917+
and as a use of the {{LoadDocumentOptions/profile}} API option.
6918+
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/244">Issue 244</a>.</li>
69126919
<li>Updated step <a href="#ctd-contains-colon">16.5</a> of the
69136920
<a href="#create-term-definition">Create Term Definition algorithm</a>
69146921
to prevent an issue where <var>term</var> might not be defined at the time it is expanded.

0 commit comments

Comments
 (0)