w3c / wot-binding-templates

Web of Things (WoT) Binding Templates
http://w3c.github.io/wot-binding-templates/
Other
22 stars 25 forks source link

Disallow changing prefix of binding ontology #239

Open egekorkan opened 1 year ago

egekorkan commented 1 year ago

Call of 08.02:

In order to allow TD parsers that do not have JSON-LD processing capability, it would be good to make sure that a binding is always declared with the same prefix. This would allow the parser to simply check for "htv:methodName" instead of resolving the context.

Everyone in the call seems to be in favor of this, any other opinions?

JKRhb commented 1 year ago

I was wondering if there is some kind of registry for well-known prefixes for JSON-LD. If not, maybe it would make sense to at least define a WoT-specific registry to keep track of all defined prefixes and to avoid conflicts in the future?

egekorkan commented 1 year ago

I think it would make sense to at least track the ones we are specifying in our deliverables. Then, I would say that we can track the popular ones separately and avoid using them.

relu91 commented 1 year ago

I think here is where we see the limitations of thinking that "JSON-LD is just JSON". Forcing a specific prefix limits the flexibility of our TDs as a JSON-LD processor would happily understand another naming, but we can't allow for this flexibility otherwise all other JSON-only parsers will fail.

I'm definitely in favor of this, I also don't know if any of the current implementations are really able to treat a Thing Description as a JSON-LD document. For example, node-wot doesn't (he wouldn't understand myprefix:methodName).

egekorkan commented 1 year ago

I have checked with the WoT developers inside Siemens and this direction is also appreciated. The ontologies we specify can have this rule but of course, other ontologies should be allowed and stay flexible.

egekorkan commented 1 year ago

Call of 22.02:

egekorkan commented 1 year ago

Also see https://github.com/w3c/wot-charter-drafts/issues/57

egekorkan commented 1 year ago

Call of 05.04: