Skip to content

Commit ffb3e68

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 3838d3c commit ffb3e68

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
@@ -6306,8 +6306,8 @@ <h3>LoadDocumentCallback</h3>
63066306
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>
63076307
and processing is terminated.</p>
63086308
<p>Processors MAY transform <var>document</var> to the <a>internal representation</a>.</p>
6309-
<p class="note">The HTTP Link Header is ignored for documents served as <code>application/ld+json</code>
6310-
or <code>text/html</code>.</p>
6309+
<p class="note">The HTTP Link Header is ignored for documents served as <code>application/ld+json</code>,
6310+
<code>text/html</code>, or <code>application/xhtml+xml</code>.</p>
63116311
</li>
63126312
<li>Otherwise, the retrieved document's <a>Content-Type</a> is neither
63136313
<code>application/json</code>,
@@ -6349,7 +6349,8 @@ <h3>LoadDocumentOptions</h3>
63496349
unless a specific <a data-cite="RFC3986#section-3.5">fragment identifier</a> is targeted,
63506350
extracts all encountered <a>JSON-LD script elements</a> using an <a>array</a> form, if necessary.</dd>
63516351
<dt><dfn data-dfn-for="LoadDocumentOptions">profile</dfn></dt>
6352-
<dd>When the resulting <a data-link-for="RemoteDocument">contentType</a> is <code>text/html</code>,
6352+
<dd>When the resulting <a data-link-for="RemoteDocument">contentType</a> is <code>text/html</code>
6353+
or <code>application/xhtml+xml</code>,
63536354
this option determines the profile to use for selecting a <a>JSON-LD script elements</a>.</dd>
63546355
<dt><dfn data-dfn-for="LoadDocumentOptions">requestProfile</dfn></dt>
63556356
<dd>One or more IRIs to use in the request as a <code>profile</code> parameter.
@@ -6411,11 +6412,13 @@ <h3>RemoteDocument</h3>
64116412
<p>This sections describe an extension to the algorithm specified
64126413
in <a>LoadDocumentCallback</a> to support extracting JSON-LD from HTML.</p>
64136414

6414-
<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,
6415+
<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
6416+
and MAY include <code>application/xhtml+xml</code> at any preference level,
64156417
unless <a data-link-for="LoadDocumentOptions">requestProfile</a> is `http://www.w3.org/ns/json-ld#context`.</p>
64166418

64176419
<p>After <a href="#LoadDocumentCallback-step-5">step 5</a>, add the following processing step:
6418-
Otherwise, if the retrieved resource's <a>Content-Type</a> is <code>text/html</code>:</p>
6420+
Otherwise, if the retrieved resource's <a>Content-Type</a> is either <code>text/html</code>
6421+
or <code>application/xhtml+xml</code>:</p>
64196422
<ol>
64206423
<li>Set <var>documentUrl</var> to the <a data-cite="HTML/urls-and-fetching.html#document-base-url">Document Base URL</a>
64216424
of <a data-link-for="LoadDocumentCallback">url</a>, as defined in [[HTML]],
@@ -6901,6 +6904,10 @@ <h2>Changes since Candidate Release of 12 December 2019</h2>
69016904
<a href="#expansion-algorithm">Expansion algorithm</a>
69026905
that duplicate the following step.
69036906
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/243">Issue 243</a>.</li>
6907+
<li>Add `application/xhtml+xml` as an allowed media type in <a href="#process-html" class="sectionRef"></a>,
6908+
in the note in <a href="#loaddocumentcallback" class="sectionRef"></a>,
6909+
and as a use of the {{LoadDocumentOptions/profile}} API option.
6910+
This is in response to <a href="https://github.com/w3c/json-ld-api/issues/244">Issue 244</a>.</li>
69046911
</ul>
69056912
</section>
69066913

0 commit comments

Comments
 (0)