-
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
bug in frame expansion algorithm? #532
Comments
In fact, the spec (if I interpret it correctly) here is in contradiction with the Framing Test input: {
"@context": {"ex": "http://example.org/"},
"@graph": [{
"@id": "ex:Sub1",
"@type": "ex:Type1"
}, {
"@id": "ex:Sub2",
"@type": "ex:Type2"
}]
} frame: {
"@context": {"ex": "http://example.org/"},
"@id": "ex:Sub1"
} output: {
"@context": {"ex": "http://example.org/"},
"@graph": [{
"@id": "ex:Sub1",
"@type": "ex:Type1"
}]
} Here the frame should expand to null according to the spec, while in this test it clearly isn't the case. |
Note that the test is bogus anyway: with the latest frame matching algorithm I cannot find any reason why |
Yes, I think it's a bug to expand the frame to null when there are no properties other than Regarding why The framing algorithm text should be more clear that when the frame has an |
Ok, then indeed the text should be completed/amended. Thank you! |
Yes, there's a missing clause in 13.2 which should allow an object with just
No, this is a specific feature in 1.1 to match on
My code is here. |
I've read the Frame matching, and I understand the intent, but the wording is not precise enough because it doesn't say that if the frame contains
To express that in JavaScript-ish, the current wording says:
while the intent is
|
Yes, that's a good point. If the frame has an |
@eroux There is a missing clause in the Expansion Algorithm 13.2. I'm amending as follows:
This style matches that used elsewhere in the algorithm. Alternatively, it could be something like the following:
Regarding node matching in the framing algorithm, how about amending the first step as follows:
The Ruby code for this is the following: return ids.include?(subject['@id']) if !ids.empty? && ids != [{}] |
…en framing. Fix frame matching algorithm to not match a node if frame has a non-empty `@id`, which is not an empty dictionary. Fixes #532.
I have a frame that just specifies an id:
as I just want this ID to be framed. It sounds quite legit to me, but when expanding the frame, the result of the expansion is null because of
13.2
. Maybe this could be true only ifframe expansion
flag is not present?The text was updated successfully, but these errors were encountered: