【发布时间】:2011-12-02 20:07:15
【问题描述】:
我想向页面添加微数据,但项目的数据被分解为页面的几个不连续部分。如果我有两个具有itemscope 属性的span 元素,是否可以让搜索引擎合并这两个项目范围并将它们解释为一个项目?
例如*:
<span itemscope itemtype="http://schema.org/Person">
Hello, my name is <span itemprop="name">Glinda</span>.
</span>
I like to fly around in a giant bubble.
<span itemscope itemtype="http://schema.org/Person">
I live in the <span itemprop="location">Land of Oz</span>.
</span>
有没有办法添加类似itemid 的属性来告诉网络蜘蛛两个Person itemscopes 应该作为一个项目而不是两个使用?
可能是这样的。
<span itemscope itemtype="http://schema.org/Person" itemid="7f6ba1">
Hello, my name is <span itemprop="name">Glinda</span>.
</span>
I like to fly around in a giant bubble.
<span itemscope itemtype="http://schema.org/Person" itemid="7f6ba1">
I live in the <span itemprop="location">Land of Oz</span>.
</span>
* 我知道在这个例子中我可以只使用一个大跨度,但我不能在我必须使用的实际页面上这样做。
编辑:也许我需要一个更好的例子。这有点做作,但说明了我遇到的问题。请记住,重新组织页面不是一种选择。
<h1>Locations</h1>
<ul>
<li itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Bob</span> lives in <span itemprop="location">Berkeley</span>
</li>
<li itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Carol</span> lives in <span itemprop="location">Cupertino</span>
</li>
</ul>
<h1>Jobs</h1>
<ul>
<li itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Bob</span> works at <span itemprop="affiliation">Borders</span>
</li>
<li itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Carol</span> works at <span itemprop="affiliation">Capitol One</span>
</li>
<ul>
有没有办法让这个微数据产生两个 Person 项目,而不是四个?
我想要住在伯克利并在 Borders 工作的 Bob,以及住在 Cupertino 并在 Capitol One 工作的 Carol。
【问题讨论】: