-
Notifications
You must be signed in to change notification settings - Fork 35
Add tests and spec text for scoped-contexts on @nest
alias.
#388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c4a0c31
Add tests and spec text for scoped-contexts on `@nest` alias.
gkellogg eca923f
Fix duplicate id.
gkellogg 4918b31
@pchampin suggestions
gkellogg 8be129e
Bump up by one c034 and c035 in expand and toRdf to assist merge.
gkellogg a51f332
Rename c035-6 to c037-8 to avoid newer tests.
gkellogg 23a615f
Rename c035-6 to c037-8 to avoid newer tests.
gkellogg 1ca6d5d
Update rubygems and bundler for travis.
gkellogg e7b759e
Merge branch 'master' into issue-380
gkellogg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2476,7 +2476,7 @@ Algorithm |
|
null , return null . |
||
@default , |
||
initialize the {{JsonLdOptions/frameExpansion}} flag to false . |
||
|
||
|
||
with a local context, initialize property-scoped context to that local context. | ||
|
||
|
||
|
@@ -2530,7 +2530,7 @@ Algorithm |
|
(where entries are IRI expanded, | ||
set active context to previous context from active context, | ||
as the scope of a term-scoped context does not apply when processing new node objects. | ||
|
||
|
||
set active context to the result of the | ||
Context Processing algorithm, | ||
passing active context, property-scoped context as local context, | ||
|
@@ -3069,9 +3069,20 @@ Algorithm |
|
nested value expands to @value , an |
||
invalid @nest value error | ||
has been detected and processing is aborted. | ||
|
||
|
||
3, | ||
8, | ||
13, | ||
and 14 | ||
using nested value for element. | ||
using nesting-key for active property, and | ||
nested value for element. | ||
Steps 3 |
||
and 8 | ||
may update the active context based on a | ||
property-scoped context associated with nesting-key. | ||
Updates to active context are restricted to the | ||
recursive operation, and do not propogate to subsequent iterations | ||
on nested values and nesting-key. | ||
By invoking steps 13 |
||
and 14 on nested value | ||
we are able to unfold arbitrary levels of nesting, with results being merged into | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"@vocab": "http://example.org/", | ||
"nest": { | ||
"@id": "@nest", | ||
"@context": { | ||
"@vocab": "http://example.org/nest/" | ||
} | ||
} | ||
}, | ||
"nest": { | ||
"property": "should be in /nest" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[{ | ||
"http://example.org/nest/property": [{"@value": "should be in /nest"}] | ||
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"@base": "http://example.org/base/", | ||
"@vocab": "http://purl.org/dc/terms/", | ||
"bibo": "http://purl.org/ontology/bibo/", | ||
"Print": "bibo:Book", | ||
"name": "http://www.w3.org/2000/01/rdf-schema#label", | ||
"instanceOf": "@nest", | ||
"contributionByRole": { | ||
"@id": "@nest", | ||
"@context": { | ||
"agent": "@nest", | ||
"aut": "creator" | ||
} | ||
}, | ||
"provisionActivityByType": { | ||
"@id": "@nest", | ||
"@context": { | ||
"Publication": { | ||
"@id": "@nest", | ||
"@context": {"date": "published", "agent": "publisher"} | ||
} | ||
} | ||
}, | ||
"identifiedByType": { | ||
"@id": "@nest", | ||
"@context": { | ||
"Isbn": {"@id": "@nest"}, | ||
"value": "bibo:isbn" | ||
} | ||
} | ||
}, | ||
"@id": "book/one", | ||
"@type": "Print", | ||
"instanceOf": { | ||
"contributionByRole": { | ||
"aut": { | ||
"agent": {"name": "Some Body"} | ||
} | ||
} | ||
}, | ||
"identifiedByType": { | ||
"Isbn": { | ||
"value": "1234567890" | ||
} | ||
}, | ||
"provisionActivityByType": { | ||
"Publication": { | ||
"date": "1999", | ||
"agent": {"name": "PubCorp"} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[{ | ||
"@id": "http://example.org/base/book/one", | ||
"@type": ["http://purl.org/ontology/bibo/Book"], | ||
"http://purl.org/dc/terms/creator": [{ | ||
"http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "Some Body"}] | ||
}], | ||
"http://purl.org/ontology/bibo/isbn": [{"@value": "1234567890"}], | ||
"http://purl.org/dc/terms/published": [{"@value": "1999"}], | ||
"http://purl.org/dc/terms/publisher": [{ | ||
"http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "PubCorp"}] | ||
}] | ||
}] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.