-
Notifications
You must be signed in to change notification settings - Fork 57
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
Expansion of prefixes within URI templates #191
Comments
I am lukewarm about this... But, in any case, this should be required to work only for predefined prefixes, right? Ivan
Ivan Herman, W3C |
Yes, I think we should be sure that template values are expanded first. I think it needs to be done when transforming into a Template used by the template processor, and before joining to the metadata base URL. I'll take the action of adding such text. |
Let me try to define a bit more precisely what this would mean in practice
Is that fine? It works for me... |
One of the consequences of merging multiple metadata files is that information should be maintained relative to the file in which it is defined. For @iherman's statement presumes that such properties are not first resolved against the in-effect base URL, but that this is deferred until the URL is expanded. So, if |
:-( :-( This whole thing becomes more and more complicated, I am really beginning to be concerned about the complexity of what we are building here. In my view @base should follow the priority that we have established for metadata. This means that @base, say, defined in the user metadata should override the metadata files. That makes things way simpler and it is simply a matter of properly defining things. Users can then easily adapt; after all, they can use absolute uri-s, @base is only a matter of convenience. (I think the way we define language and use @language already takes care of that for language tags) Ivan
Ivan Herman, W3C |
I'm sympathetic, and it is indeed getting complex :(
I believe we said elsewhere that information defined in a metadata file would be localized to that file. Certainly, a From a JSON-LD view, it depends on how we treat a URI Template property; if it is to be treated as a URI (which, at least for Note that if something like propertyUrl were defined as "schema:{_name}", then it would expand to "http://schema.org/{_name}", which would typically have the desired effect, if say, the column name were "name" or "description". |
And that may have consequences. W3C specifications, and therefore their implementations, often get very (too) complex, this is an issue we are facing with the community. I am genuinely concerned of getting to the same problem here, and users as well as implementers will become really messed up.
I do not know whether we say that, but I am not sure we should make such an overall statements.
Correct
I am not sure of this. Why would that be necessarily the case, except for consistency? See also my comment below...
I think we should be careful with the way we look at JSON-LD. I believe the relationship between the CSV metadata and JSON-LD (or RDF) should be defined saying that the final (ie, merged) metadata is JSON-LD compatible and interpretable, but not (necessarily) the constituents. In general, it is the final metadata that really counts, and the constituents could be considered as #include files, so to say... And, unfortunately I would say, I think that, from a JSON-LD point of view, the templates are no URI-s. They are strings and should be treated so in the JSON-LD @context. That is the only consistent interpretation in my view...
I do not understand that. In my mental model, "schema:{_name}" would expand to "schema:description" as far as the template expansion goes, and that would be expanded, by virtue of the default prefixes, to "http://schema.org/description". I am not sure how this relates to the issue of @base Ivan
Ivan Herman, W3C |
We should definitely set aside time at th F2F to address complexity and see if we might readdress some of iur assumptions to make things simpler. Regarding URI Template properties we should follow the dictum of least surprise. That may very well mean treating such properties as liiterals |
Huge +1! Ivan
Ivan Herman, W3C |
Resolved at Feb F2F. The order of processing is as described in #191 (comment). These properties are string properties, the URL template is expanded first. Any resolution (ie expanding prefixes & resolving against a base URL) is done after that expansion. Editor action to make this so. |
It would be quite useful to be able to do:
Given that
propertyUrl
is a URI template, the way to make this work would be to expand the prefix either before or after its expansion as a URI template. I suggest after.The text was updated successfully, but these errors were encountered: