Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6572,7 +6572,7 @@ <h3>LoadDocumentCallback</h3>
<pre class="idl">
callback LoadDocumentCallback = Promise&lt;RemoteDocument> (
USVString url,
optional LoadDocumentOptions? options
optional LoadDocumentOptions options = {}
);
</pre>

Expand Down
28 changes: 28 additions & 0 deletions tests/expand-manifest.html
Original file line number Diff line number Diff line change
Expand Up @@ -3217,6 +3217,34 @@ <h2>
</dd>
</dl>
</dd>
<dt id='t0132'>
Test t0132 @base does not expand property keys
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#t0132</dd>
<dt>Type</dt>
<dd>jld:PositiveEvaluationTest, jld:ExpandTest</dd>
<dt>Purpose</dt>
<dd>Property keys are expanded vocabulary-relative (`@vocab`, term definitions, compact IRIs with a defined prefix). `@base` is for document-relative IRI resolution where the algorithms pass that flag (e.g., certain `@id` and `@type` values), not for unmapped simple keys. With only `@base` set, an unmapped key like `name` has no vocabulary mapping and must be dropped; a relative `@type` token still resolves against the base. See IRI Expansion in the JSON-LD 1.1 Processing Algorithms and API.</dd>
<dt>input</dt>
<dd>
<a href='expand/0132-in.jsonld'>expand/0132-in.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
<a href='expand/0132-out.jsonld'>expand/0132-out.jsonld</a>
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tc001'>
Test tc001 adding new term
</dt>
Expand Down
8 changes: 8 additions & 0 deletions tests/expand-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,14 @@
"input": "expand/0131-in.jsonld",
"expect": "expand/0131-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#t0132",
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
"name": "@base does not expand property keys",
"purpose": "Property keys are expanded vocabulary-relative (`@vocab`, term definitions, compact IRIs with a defined prefix). `@base` is for document-relative IRI resolution where the algorithms pass that flag (e.g., certain `@id` and `@type` values), not for unmapped simple keys. With only `@base` set, an unmapped key like `name` has no vocabulary mapping and must be dropped; a relative `@type` token still resolves against the base. See IRI Expansion in the JSON-LD 1.1 Processing Algorithms and API.",
"input": "expand/0132-in.jsonld",
"expect": "expand/0132-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tc001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
Expand Down
9 changes: 9 additions & 0 deletions tests/expand/0132-in.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": {
"@version": 1.1,
"@base": "https://example.org/vocab/base/"
},
"@id": "https://example.org/doc",
"@type": "Thing",
"name": "value"
}
4 changes: 4 additions & 0 deletions tests/expand/0132-out.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[{
"@id": "https://example.org/doc",
"@type": ["https://example.org/vocab/base/Thing"]
}]