Schema.org 预期类型也可以是集合吗?
Can Schema.org Expected Types be collections, too?
一个Schema.org object of type Person
can have a sameAs
property of type URL
. According to Google's structured data site,sameAs
属性可以是单项也可以是数组
Schema.org 上的文档没有提到 sameAs
可以是单个项目还是数组。这只是 Google 偏离了 Schema.org 吗?还是 Schema.org 中的所有属性都可以是单项或数组?
每个 Schema.org 属性 可以有多个值。对于某些属性(例如 birthDate
),它不一定有意义,但它仍然是允许的。
在JSON-LD:
"sameAs": ["/foo", "/bar"],
在微数据中:
<link itemprop="sameAs" href="/foo" />
<link itemprop="sameAs" href="/bar" />
在 RDFa 中:
<link property="sameAs" href="/foo" />
<link property="sameAs" href="/bar" />
这并不一定意味着 Google(或任何其他消费者)也支持每个 属性。因此,当 Google 在其文档中明确提及这一点时,您可以确定相应的搜索结果功能适用于多个值。
一个Schema.org object of type Person
can have a sameAs
property of type URL
. According to Google's structured data site,sameAs
属性可以是单项也可以是数组
Schema.org 上的文档没有提到 sameAs
可以是单个项目还是数组。这只是 Google 偏离了 Schema.org 吗?还是 Schema.org 中的所有属性都可以是单项或数组?
每个 Schema.org 属性 可以有多个值。对于某些属性(例如 birthDate
),它不一定有意义,但它仍然是允许的。
在JSON-LD:
"sameAs": ["/foo", "/bar"],
在微数据中:
<link itemprop="sameAs" href="/foo" />
<link itemprop="sameAs" href="/bar" />
在 RDFa 中:
<link property="sameAs" href="/foo" />
<link property="sameAs" href="/bar" />
这并不一定意味着 Google(或任何其他消费者)也支持每个 属性。因此,当 Google 在其文档中明确提及这一点时,您可以确定相应的搜索结果功能适用于多个值。