w3c / tdm-reservation-protocol

Repository of the Text and Data Mining Reservation Protocol Community Group
https://www.w3.org/community/tdmrep/
Other
9 stars 8 forks source link

Should the vcard prefix be explicitly declared? #15

Closed llemeurfr closed 3 years ago

llemeurfr commented 3 years ago

In the ODRL Model, examples containing vcard present a definition of the vcard prefix.

From Example 9:

    "@context": [
        "http://www.w3.org/ns/odrl.jsonld",
        { "vcard": "http://www.w3.org/2006/vcard/ns#" }
    ],

But http://www.w3.org/ns/odrl.jsonld itself contains a definition of this prefix.

Is there a good reason to redefine it in the jsno-ld instances?

llemeurfr commented 3 years ago

After talking with @iherman, I tested the [first policy example]() with the JSON-LD playground to be sure. The compacted version below shows that the vcard prefix defined in the odrl.jsonld file is sufficient.

{
  "@id": "https://provider.com/policy/1",
  "@type": "http://www.w3.org/ns/odrl/2/Offer",
  "http://www.w3.org/ns/odrl/2/assigner": {
    "@id": "https://provider.com",
    "http://www.w3.org/2006/vcard/ns#fn": "Provider",
    "http://www.w3.org/2006/vcard/ns#hasEmail": "mailto:contact@provider.com"
  },
  "http://www.w3.org/ns/odrl/2/obligation": {
    "http://www.w3.org/ns/odrl/2/action": {
      "@id": "http://www.w3.org/ns/odrl/2/obtainConsent"
    }
  },
  "http://www.w3.org/ns/odrl/2/profile": {
    "@id": "https://edrlab.org/tdmrep/odrl-profile"
  }
}