-
Notifications
You must be signed in to change notification settings - Fork 35
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
use CURIEs in $linkedData #285
Comments
Googling @OR13 @nissimsan Who should I ping about this? |
@VladimirAlexiev indeed, we built a tiny library that generates a JSON-LD context file from a directory of JSON Schemas: This allows us to "look at the types" through 2 different lenses. |
@nissimsan @OR13 can you use CURIEs (shortened URLs) in the schemas and generated context? |
I'm a -1 to using them, I have found them to cause problems just like using a global namespace causes problems, I suggest we close this issue as "wont' do"... possibly after documenting the decision. |
@nissimsan @BenjaminMoe please comment. |
@OR13 Not sure what you mean. |
my comment was based on this and other discussions I have had on the security vocab... I can see both sides I suppose. |
@OR13 on May 10:
"Cool URIs don't change", we all know that principle (though in practice it's violated too often). But for URIs to be usable, they need to be shortened. w3c-ccg/security-vocab#57: @dlongley
#268 proves the disadvantage of not using CURIEs. I think that using long URIs is asking too much of authors.
Do you mean that someone might accidentally use
Context definitions are designed to "spill out" into the data.
In 10 years of ontology work, I've only seen one case of unintended conflation:
Let's not throw out the baby with the bathing water, ok? Let's evaluate the benefits against the dangers in a realistic way. |
No, it is much more likely that they will use
Yes, I believe this to be a mistake. It should have been possible to isolate them. Even then, people will make mistakes when using type-scoped contexts -- as this mistake was made in a W3C REC (w3c/vc-data-model#778). |
At least in the context of this work item, we are not using CURIEs... we discussed this on several calls. We are not hand crafting the JSON-LD context, its built from JSON Schema... the context builder does not support all the features of JSON-LD and we think thats a good thing. That being said, if you have another context where you want to use CURIE's I think there are cases where maybe thats ok... if the group knows what they are doing, and agrees thats a thing they want to do... and they know what they are doing. |
@dlongley Your reasoning is a akin to this:
@OR13 You use no prefixes at all in instance data. That's a valid strategy because it makes it easier for people.
My (heated) arguments above are for the benefit of end users.
|
Other ways of looking at this:
Of course people could still use A, but it's more complex so it's harder to get right, so we shouldn't recommend it. Now, maybe you say that's not quite fair here because perhaps the "same use cases" clause doesn't apply. Here's a case where the same use cases aren't solved either, but for good reason:
When you're creating a standard, you need to be able to defend certain choices in light of the trade offs. Maybe there's a combination that's safe that you can't make with B that you can make with A. But going with B is better because there are also many unsafe combinations that you can make with A. Method A is often called a "foot gun". You could also look at this like programming language trade offs -- do we want a "language" that is like Rust or one that is like C? The target constituencies (and security outcomes) may be different. I don't think the pros for CURIEs outweigh the cons. I don't think the implementation complexity, security problems, or user confusion they create are worth it. I think there are either other ways to solve what they are solving that are of greater benefit to users or that the use case to be solved doesn't reach the threshold required to overcome the implementation concerns. But, at the end of the day, I'm just one person and if I can't convince the community of my position, then we'll wind up going in another direction. Some thoughts on your responses to @OR13:
Using namespaces isn't the issue here (at least, I didn't think it was). CURIEs are. You can still use namespaces without CURIEs. If you meant "CURIEs" here instead of "namespaces", why do you think you'll necessarily have too many ontologies and too many terms at once -- such that -- you will need to use CURIEs? Why would CURIEs be the only solution?
You can either worry about CURIEs or worry about term conflicts. You may find that worrying about term conflicts actually produces better looking data -- and I'd expect this to be the case for JSON developers. I believe the priority of constituencies should also place consumers of data before authors. If you more strongly type your data and use type-scoped contexts to determine term definitions you'll make the developers that have to work with your data happier, IMO. I think this approach is more idiomatic for JSON developers than CURIEs -- and more natural for many other developers as well. I don't think CURIEs are the best solution to this problem for JSON-LD.
This may be true. If ontology authors publish type-scoped contexts, however, I would expect it to reduce the concerns without having to involve CURIEs. Even if ontology authors don't do this, anyone else can craft their own contexts that do -- and perhaps share those with the community.
Mine too. (Though for my arguments sake ... I hope they don't come across as "heated"!) |
@OR13 @dlongley @VladimirAlexiev is there an action item on this issue? |
I don't think so, we have decided not to curies... I suggest we close this issue. |
Decision is to not do this. Closing. |
Mistakes like #268 will be avoided if you define prefixes in the JSONLD context:
As you can see here: https://service.unece.org/trade/uncefact/vocabulary/uncl1153.jsonld.
And then use CURIEs in
$linkedData
instead of full URLs, egIs that possible in the JSON Schema that you use?
The text was updated successfully, but these errors were encountered: