Skip to content

Commit 54ab6e9

Browse files
committed
Base URL for rel=alternate is the alternate URL, not that of the original URL.
Fixes #139
1 parent ca800b3 commit 54ab6e9

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5757,8 +5757,7 @@ <h3>LoadDocumentCallback</h3>
57575757
and the response has an HTTP Link Header [[RFC8288]] using the <code>alternate</code> link relation
57585758
with type `application/ld+json`,
57595759
set <var>url</var> to the associated <code>href</code> relative to the previous <var>url</var>
5760-
and restart the algorithm from <a href="#LoadDocumentCallback-step-2">step 2</a>,
5761-
ensuring that <var>documentUrl</var> is set to the original <var>url</var>.</li>
5760+
and restart the algorithm from <a href="#LoadDocumentCallback-step-2">step 2</a>.</li>
57625761
<li id="LoadDocumentCallback-step-5">If the retrieved resource's <a>Content-Type</a> is <code>application/json</code>
57635762
or any media type with a <code>+json</code> suffix as defined in [[RFC6839]]
57645763
except <code>application/ld+json</code>,

tests/remote-doc-manifest.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
}, {
178178
"@id": "#tla05",
179179
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
180-
"name": "Base remains that of original document",
180+
"name": "Base is that of the alternate URL",
181181
"purpose": "Load an alternate link if type is not ld+json and rel=alternate.",
182182
"option": {
183183
"httpLink": "<la05-alternate.jsonld>; rel=\"alternate\"; type=\"application/ld+json\""

tests/remote-doc/la05-out.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[{
2-
"@id": "https://w3c.github.io/json-ld-api/tests/remote-doc/la05-in.html",
2+
"@id": "https://w3c.github.io/json-ld-api/tests/remote-doc/la05-alternate.jsonld",
33
"http://example.org/content": [{"@value": "alternate"}]
44
}]

0 commit comments

Comments
 (0)