Schema.org - How can you define an object across m

2019-01-20 19:42发布

问题:

Using schema.org markup, if I define many items with the same name across multiple pages, but with different sets of properties defined on each page, is each item only relevant within the scope of the page it is defined on, or is there a way to tie all of them items together to create a single, complete definition?

回答1:

Syntax: itemid

Microdata defines an itemid attribute:

[…] to give a global identifier for the item, so that it can be related to other items on pages elsewhere on the Web.

The vocabulary (in this case, Schema.org) would have to define what exactly such a global identifier should mean, and if or if not multiple items may have the same global identifier, and if yes, how these items should be processed.

So far, Schema.org does not define this.

An obvious assumption would be: Items (whether on the same page or on different pages, whether on the same site or on different sites) with the same itemid are about the same thing.

Vocabulary: unique property values

By specifying properties that expect unique values, consumers could (if they want to) deduce that two or more items are about the same thing.

The properties sameAs and url are appropriate candidates, as they can be used for any Schema.org type.

Some more specific types define other suitable properties, like globalLocationNumber, email etc.