-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add graph container array tests. #585
base: main
Are you sure you want to change the base?
Conversation
- Add tests for `@graph` `@container` with and without nullified context with an array of plain literals. - Add tests for `@graph` `@id` `@container` with and without nullified context with an array of IRIs.
The implication in the Expand Algorithm step 13.12.1 is that if must either be a node object or a graph object, and not a value object. I agree that if it is a value object, should be omitted. However, I do get an expanded output after accounting for this:
I don't know of a step in the expansion algorithm which would eliminate this entry. It did require a change in 13.12.1 to eliminate expanded values which are not either node objects or graph objects if container includes |
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.
As I noted, I think the expansion results should be different, although it does not change the RDF results.
This issue was discussed in a meeting.
|
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.
Sorry for the late review.
If we are to make a significant change to the spec for handling this corner case (which, IIUC, would be required to justify these test results), I think I would rather lean towards raising an error on these input.
The way we've handled other such issues is to create an erratum and note it as a substantive change. Our charter allows us to address errata, which IMO would include this. Tests are appropriate once the erratum is accepted and changes have been added to the draft. |
@graph
@container
with and without nullified context with an array of plain literals.@graph
@id
@container
with and without nullified context with an array of IRIs.The expand/toRdf parallel testing and number is a bit confusing. Not all the tests have a twin. I jumped up to 0200 thinking maybe going forward from there new tests might align better.
As of now, different implementations have different results for these sorts of tests. For instance, for 0203:
People have been looking at this construct in places like the VC work. Providing URLs in the
verifiableCredential
property of a VP (I think). This additional coverage is needed to understand what should happen here unless this is specifically undefined behavior. (I'm not sure if some tests duplicate other tests, added variations for clarity.)I'm not sure what the output should be of these tests. Currently it has the jsonld.js empty output, but that may not be correct in all cases?
What other variations of these tests should be added?
Also related is what to do with a
"@container": ["@graph", "@id"]
with only a IRI provided instead of a mapping. I'm not sure that has test either. It outputs<ex:outer> <ex:p> <ex:test> .
/... "ex:test"
triples in jsonld.js and others, which seems closer to the behavior people might expect without the@id
, but the feature was designed for only mappings instead of values like this?