url 与相同 (schema.org)
url vs sameAs (schema.org)
在 schema.org 中使用 url vs sameAs 属性有什么实际区别?
我正在向包含数百万页面的大型 Internet 网站添加微数据信息。使用正确的标签非常重要。例如,上下文可以是描述县、州或 public 公园的官方页面上的 link。它也可能是包含有关该主题的更多详细信息的外部页面的 link(基本上可以是从药物处方到英语语法范围内的任何内容)。
[请注意,您正在 linkschema:URL
(which is a datatype) and not to schema:url
(您的问题似乎是 属性)。 Schema.org URI 区分大小写。]
对于作者: 将 url
视为您想要使用的 URL 通常是有意义的(通常来自您自己的网站),和 sameAs
的 URL(s) 其他人用于同一事物(通常来自外部网站)。
对于消费者: 使用 url
输出 link 并从作者的网站中查找有关同一项目的更多数据可能有意义透视(例如,跟随前导页面上的 link 到完整的文章页面),并使用 sameAs
更好地理解作者在他们的项目中描述的内容。
例子
我们以Jamendo为例,一个关于free/libre音乐的网站。
他们有一个关于音乐组 "pornophonique" (/en/artist/8303/pornophonique) and they have various pages that link to this page (e.g., /en/search?qs=q=pornophonique) 的页面。
该小组还有一个官方网站(http://www.pornophonique.de/) and a Wikipedia article (https://en.wikipedia.org/wiki/Pornophonique)。
在搜索结果页面上,Jamendo 可以简单地 link 到他们自己的 URL 组:
<!-- on <https://www.jamendo.com/en/search?qs=q=pornophonique> -->
<article itemscope itemtype="http://schema.org/MusicGroup">
<a itemprop="url" href="https://www.jamendo.com/en/artist/8303/pornophonique"></a>
</article>
在专用页面上,他们可以再次指定此 url
,以表明它是项目的规范 URL:
<!-- on <https://www.jamendo.com/en/artist/8303/pornophonique> -->
<body itemscope itemtype="http://schema.org/MusicGroup">
<link itemprop="url" href="https://www.jamendo.com/en/artist/8303/pornophonique" />
</body>
在同一组页面上,Jamendo 可以使用 sameAs
到 link 到官方网站(因为主页 URL 通常代表该网站是关于)和维基百科文章:
<!-- on <https://www.jamendo.com/en/artist/8303/pornophonique> -->
<body itemscope itemtype="http://schema.org/MusicGroup">
<link itemprop="url" href="https://www.jamendo.com/en/artist/8303/pornophonique" />
<section>
<h1>External links</h1>
<ul>
<li><a itemprop="sameAs" href="http://www.pornophonique.de/">Official website</a></li>
<li><a itemprop="sameAs" href="https://en.wikipedia.org/wiki/Pornophonique">Wikipedia article</a></li>
</ul>
</section>
</body>
(当然他们也可以在搜索结果页面上这样做,如果他们不介意数据 repetition/overhead。)
并且可以肯定的是:在 Jamendo 的页面上关于他们的一首曲目(例如,https://www.jamendo.com/en/track/81740/sad-robot), Jamendo should not use url
to link to the group’s page or sameAs
to link to the Wikipedia article, as both URLs do not represent/identify the track. A possible sameAs
value would be the URL of the page about this track on the group’s official website (http://www.pornophonique.de/download.php?song_id=1)。
<!-- on <https://www.jamendo.com/en/track/81740/sad-robot> -->
<body itemscope itemtype="http://schema.org/MusicRecording">
<link itemprop="url" href="https://www.jamendo.com/en/track/81740/sad-robot" />
<link itemprop="sameAs" href="http://www.pornophonique.de/download.php?song_id=1" />
</body>
在 schema.org 中使用 url vs sameAs 属性有什么实际区别?
我正在向包含数百万页面的大型 Internet 网站添加微数据信息。使用正确的标签非常重要。例如,上下文可以是描述县、州或 public 公园的官方页面上的 link。它也可能是包含有关该主题的更多详细信息的外部页面的 link(基本上可以是从药物处方到英语语法范围内的任何内容)。
[请注意,您正在 linkschema:URL
(which is a datatype) and not to schema:url
(您的问题似乎是 属性)。 Schema.org URI 区分大小写。]
对于作者: 将 url
视为您想要使用的 URL 通常是有意义的(通常来自您自己的网站),和 sameAs
的 URL(s) 其他人用于同一事物(通常来自外部网站)。
对于消费者: 使用 url
输出 link 并从作者的网站中查找有关同一项目的更多数据可能有意义透视(例如,跟随前导页面上的 link 到完整的文章页面),并使用 sameAs
更好地理解作者在他们的项目中描述的内容。
例子
我们以Jamendo为例,一个关于free/libre音乐的网站。
他们有一个关于音乐组 "pornophonique" (/en/artist/8303/pornophonique) and they have various pages that link to this page (e.g., /en/search?qs=q=pornophonique) 的页面。
该小组还有一个官方网站(http://www.pornophonique.de/) and a Wikipedia article (https://en.wikipedia.org/wiki/Pornophonique)。
在搜索结果页面上,Jamendo 可以简单地 link 到他们自己的 URL 组:
<!-- on <https://www.jamendo.com/en/search?qs=q=pornophonique> --> <article itemscope itemtype="http://schema.org/MusicGroup"> <a itemprop="url" href="https://www.jamendo.com/en/artist/8303/pornophonique"></a> </article>
在专用页面上,他们可以再次指定此
url
,以表明它是项目的规范 URL:<!-- on <https://www.jamendo.com/en/artist/8303/pornophonique> --> <body itemscope itemtype="http://schema.org/MusicGroup"> <link itemprop="url" href="https://www.jamendo.com/en/artist/8303/pornophonique" /> </body>
在同一组页面上,Jamendo 可以使用
sameAs
到 link 到官方网站(因为主页 URL 通常代表该网站是关于)和维基百科文章:<!-- on <https://www.jamendo.com/en/artist/8303/pornophonique> --> <body itemscope itemtype="http://schema.org/MusicGroup"> <link itemprop="url" href="https://www.jamendo.com/en/artist/8303/pornophonique" /> <section> <h1>External links</h1> <ul> <li><a itemprop="sameAs" href="http://www.pornophonique.de/">Official website</a></li> <li><a itemprop="sameAs" href="https://en.wikipedia.org/wiki/Pornophonique">Wikipedia article</a></li> </ul> </section> </body>
(当然他们也可以在搜索结果页面上这样做,如果他们不介意数据 repetition/overhead。)
并且可以肯定的是:在 Jamendo 的页面上关于他们的一首曲目(例如,https://www.jamendo.com/en/track/81740/sad-robot), Jamendo should not use
url
to link to the group’s page orsameAs
to link to the Wikipedia article, as both URLs do not represent/identify the track. A possiblesameAs
value would be the URL of the page about this track on the group’s official website (http://www.pornophonique.de/download.php?song_id=1)。<!-- on <https://www.jamendo.com/en/track/81740/sad-robot> --> <body itemscope itemtype="http://schema.org/MusicRecording"> <link itemprop="url" href="https://www.jamendo.com/en/track/81740/sad-robot" /> <link itemprop="sameAs" href="http://www.pornophonique.de/download.php?song_id=1" /> </body>