Open elf-pavlik opened 9 years ago
https://github.com/schemaorg/schemaorg/issues/239#issuecomment-88974791
No, url and @id are really different things, and it could be a mistake to alias them. @id sets the subject of the statements derived from an object, whereas url establishes an object value. It is true that url is often use for identifying the subject as well, but not necessarily. In many cases, it seems to act like sameAs.
...
The distinction between using an anonymous node with a url reference to the thing it describes, and using that thing as the subject goes back to many Microdata examples, where the use of @itemid is rare. In the end, I don't think the search engines care, and the semantic modelers presumably know the difference. If I were modeling it, I'd typically use @id.
Looking at trimmed example which we can find on http://schema.org/Offer
{
"@context": "http://schema.org",
"@type": "Event",
"location": {
"name": "The Hi-Dive"
},
"name": "Typhoon with Radiation City",
"offers": {
"@type": "Offer",
"price": "13.00",
"priceCurrency": "USD",
"url": "http://www.ticketfly.com/purchase/309433"
},
"startDate": "Sat Sep 14"
}
To my understanding one MUST NOT try to use as equivalent the value of url instead of nested object!
{
"@context": "http://schema.org",
"@type": "Event",
"location": {
"name": "The Hi-Dive"
},
"name": "Typhoon with Radiation City",
"offers": "http://www.ticketfly.com/purchase/309433",
"startDate": "Sat Sep 14"
}
Similar if "The Hi-Dive" had "url": "http://hi-dive.example"
, one can NOT use
{
"@context": "http://schema.org",
"@type": "Event",
"location": "http://hi-dive.example",
"name": "Typhoon with Radiation City",
"offers": "http://www.ticketfly.com/purchase/309433",
"startDate": "Sat Sep 14"
}
And always use nested objects (blank nodes) like:
{
"@context": "http://schema.org",
"@type": "Event",
"location": { "url": "http://hi-dive.example" },
"name": "Typhoon with Radiation City",
"offers": { "url": "http://www.ticketfly.com/purchase/309433"},
"startDate": "Sat Sep 14"
}
In such case, I think we can resolve this issue by clearly documenting the difference between use of @id
and url
with examples similar to those above.
Being fairly new to schema.org I am confused by this as well. I don't see how url
and @id
are really that different from a conceptual view. Coming from a linked data world, it seems only @id
makes sense since typically you describe a given thing. If you don't describe that thing, then what does url
refer to? So +1 for guidance on that.
This issue is being tagged as Stale due to inactivity.
continuing discussion with @gkellogg from #239
just few occurrences of
@id
from commits by @danbri but those on Product examples suggest @mfhepp https://github.com/schemaorg/schemaorg/blame/sdo-gozer/data/examples.txtwhile ImageObject and thumbnail have their own peculiarities, I really have hard time to believe that in general schema.org doesn't actually use
"url"
as"@id"
also mentioned on https://github.com/schemaorg/schemaorg/wiki/JsonLd#improvements