-
Notifications
You must be signed in to change notification settings - Fork 152
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
@graph container support #549
Conversation
I'll get to my review this weekend, after completing my own implementation, thanks for doing the heavy lifting! A concern is that, while this allows |
…tion includes `@graphid`.
…"hl-bold". This makes rendered JavaScript examples slightly less pretty, but restores the specific highlighting used with "****" in examples.
@gkellogg Comments on recent commits: I think the Removing the highlight bit is unfortunate. Would be nice to find a better solution for that. You marked off the {
"@context": {
"@vocab": "ex:",
"index-container": {
"@id": "ex:index-container",
"@container": ["@graph", "@index"]
},
"id-container": {
"@id": "ex:id-container",
"@container": ["@graph", "@id"]
}
},
"index-container": {
"idx1": { ... }
},
"id-container": {
"ima:id": { ... }
}
} Which would expand out into something like: [
{
"ex:index-container": [
{
"@graph": ...,
"@index": "idx1"
}
],
"ex:id-container": [
{
"@graph": ...,
"@id": "ima:id"
}
]
}
] |
Sure
I'll, of course, add spec text; it's pretty straight-forward, but there may be some corner-cases to explore.
👍
Open to suggestions, we could simply use
I've looked, and perhaps there's something hidden in highlight.js we could take advantage of. OTOH, it basically looks the same as it did in 1.0 (minus the diff-marking, which its just CSS).
What is done is that |
@dlongley Thinking about it some more, it's probably better to use the |
@davidlehn and @dlongley Tests, syntax and algorithms are updated to reflect my implementation of basic graph containers, as well as the map versions. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's good to go now.
@dlongley We have support for I'm not sure how useful The only argument to leave it, is that |
I think the As for In any case, I'm +1 to merging the PR as is and happy defer any additional decisions to later/another PR. Great work, guys, I especially like that there was no need for an additional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just needs rebasing due to conflicts.
Looking at my implementation, I don't think it really makes implementation more complicated; one line in compaction, and a bit more complicated logic in error detection when looking at the term definition. The language in Syntax is slightly more complicated, but probably not worth changing now. |
# Conflicts: # spec/latest/json-ld/index.html
has <code>@container</code> set to <code>@graph</code> are interpreted as | ||
<a>implicitly named graphs</a>, where the associated graph name is either | ||
assigned from a new <a>blank node identifier</a>, or defined using | ||
<code>@graphId</code>.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkellogg Was this supposed to be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this remains, and is what is used by verifiable credentials. We may need to add more about graph id and index containers, though.
What we removed was anything about graphId.
Work-in-progress PR.
"@container": "@graph"
expand/compact tests."@container": ["@graph", "@set"]
expand/compact tests.@id
or@index
usage with@graph
?