微格式、rdf 或微数据

发布于 2024-09-04 16:54:15 字数 109 浏览 10 评论 0原文

使用其中一项技术有什么区别吗?

我现在正在使用 HTML5 构建一个网站,但我很难决定使用哪一个。 除了语法大小之外,我看不出它们之间有任何区别,我不太确定这对于微格式方面是否是一个优势。

Is there any difference between using one of this technologies?

I'm building now a site using HTML5, and I'm having hard time to decide which one of them to use.
I cannot see any difference between them, else the syntax size, which I'm not quite sure is an advantage for the microformats side.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

说不完的你爱 2024-09-11 16:54:15

*编辑,2015 年 5 月:时代变了......再次。 Schema.org 似乎是一种可行的方法,使用微数据(W3C 注释)或 RDFa(W3C 推荐),其中 RDFa Lite 变体最容易学习。同时最近Microformats也发布了新版本,目前还没有人关注。

另请参阅RDF、RDFa、微格式和微数据之间的关系是什么?

编辑, 2011 年 8 月:时代变了。忘记我下面的推荐。只需使用微数据,而忘记其他两种的存在。

微格式:三种格式中最古老且最简单的一种。如果现有规范满足您的需求(即,您想要标记地址、事件、朋友链接,或另一种受支持的数据类型),那么它们是一个不错且实用的选择。问题是,如果您想标记官方规范不支持的某种数据,则无法创建自己的微格式。

RDFa:这个基于 W3C 的 RDF 数据模型(它基本上是一种将 RDF 数据嵌入 HTML 页面的方法)。 RDF 已经存在很长时间了,并且有大量的奇特工具可用于处理 RDF 数据(存储、搜索引擎、查询语言、图形可视化工具等)。那么RDFa将带您进入这个庞大的现有生态系统。但这也使得 RDFa 变得有点复杂,并且学习曲线比其他提案更陡峭。

Microdata:这是 Ian Hickson 对 RDFa 的反提案。从本质上讲,它是微格式的可扩展版本。它没有RDF连接并且比RDFa更简单。它仍然很新,还没有得到太多采用,所以现在下结论还为时过早。 更新:schema.org 确实在这里达成了协议。

我的建议是如果微格式满足您的需求,则使用微格式,否则使用 RDFa。

*Edit, May 2015: Times have changed... again. Schema.org seems the way to go, using either microdata (W3C note) or RDFa (W3C recommendation), where the RDFa Lite variant is easiest to learn. Meanwhile recently Microformats released a new version as well, which nobody is paying attention to currently.

Also see the answer to What is the relationship between RDF, RDFa, Microformats and Microdata?

Edit, August 2011: Times have changed. Forget my recommendation below. Just use microdata and forget that the other two exist.

Microformats: the oldest and the simplest of the three. If the existing specs cover your needs (that is, you want to mark up addresses, events, friend links, or another one of the supported data types), then they are a nice and practical choice. The problem is that you cannot make your own microformat if you want to mark up some kind of data that's not supported by the official specs.

RDFa: This one is based on W3C's RDF data model (it's basically a way of embedding RDF data into HTML pages). RDF has been around for a long time and there's a large amount of fancy tools for doing stuff with RDF data (stores, search engines, query languages, graph visualizers and so on). So RDFa takes you into this big existing ecosystem. But this also makes RDFa kind of complicated, and the learning curve is steeper than for the other proposals.

Microdata: This is Ian Hickson's counter-proposal to RDFa. In spirit, it is an extensible version of microformats. It doesn't have the RDF connection and is simpler than RDFa. It's still very new and hasn't seen much adoption yet, so it's a bit early to tell. Update: schema.org really seals the deal here.

My recommendation would be to go with microformats if they cover your need, and RDFa otherwise.

网名女生简单气质 2024-09-11 16:54:15

我会使用 Microdata,因为 Google、Microsoft 和 Yahoo 已经在 Microdata 上进行了合作,并在 http://schema.org 上正式化了架构。那里的工具并不多,并且存在一些规范错误(特别是它们的示例),它得到更广泛的采用只是时间问题。

I would use Microdata given that Google, Microsoft and Yahoo have collaborated on Microdata and formalized the schemas at http://schema.org. There aren't many tools out there and some spec bugs they have (in particular with their examples), it's only a matter of time before it has more widespread adoption.

回眸一遍 2024-09-11 16:54:15

2012 年 11 月:

现在 e- GoodRelations 项目的商业模式已集成到 schema.org 中,您有更多理由使用微数据。(除了 @cygri 指出。)

到目前为止,GoodRelations 和 Schema.org 是相关的,但词汇表是独立的。通过这种集成,大部分 GoodRelations 词汇表现在可以在 schema.org 中使用。

对于那些一直使用 RDFa 来标记 GoodRelations 的人来说,情况没有改变。 GoodRelations 的开发者 Martin Hepp 表示,“GoodRelations 将仍然是一个独立的词汇表,并且可用RDFa 和其他 RDF 语法。”

但大多数使用 schema.org 的网站都在使用微数据,包括沃尔玛、Overstock 和 eBay 等电子商务巨头。对于这些网站来说,可以用微数据标记的电子商务信息类型已经得到了极大的扩展。

因此,如果您从头开始,请使用微数据。但如果您已经在使用 RDFa,那么现在没有理由进行更改。

November 2012:

Now that e-commerce schemas from the GoodRelations project have been integrated into schema.org, you have even more reasons to use microdata. (additionally to the ones @cygri has pointed out.)

Until now, GoodRelations and Schema.org were related, but separate vocabularies. With this integration, the bulk of the GoodRelations vocabulary is now available in schema.org.

For those who had been using RDFa to markup GoodRelations, the situation is unchanged. The developer of GoodRelations, Martin Hepp, said that "GoodRelations will remain an independent vocabulary, and usable in RDFa and other RDF syntaxes."

But most of the sites that have been using schema.org have been employing microdata, including e-commerce giants like WalMart, Overstock and eBay. For these sites, the type of e-commerce information that can be marked with microdata has been vastly extended.

So if you are starting from scratch, go with microdata. But If you are already using RDFa, there is no reason to change now.

葮薆情 2024-09-11 16:54:15

RDF 更强大,因为它支持 FOAF 之类的东西。

如果您无法承受这种复杂性,只需使用 Schema.org。

所有排序,哦,搜索引擎也喜欢它。

RDF is just more powerful as it supports things like FOAF.

If you are not up for that complexity, just use Schema.org.

All sorted and oh, Search Engines like it too.

哭了丶谁疼 2024-09-11 16:54:15

RDFa-> )

更多资源(空白节点、CURIE等 简单且流行,资源较少且不支持自定义词汇表

Microdata ->很酷的 itemref 资源,非常非常新......

RDFa -> more resources (blank nodes, CURIE etc..)

Microformarts -> simply and popular, minor resources and no support to custom vocabularies

Microdata -> cool itemref resource, very very new...

闻呓 2024-09-11 16:54:15

从对 CURIE 的支持缺失可以看出,微数据使 RDFa 重生得更加坚强。 schema.org 仅解决搜索的横切问题。除非内容涉及具有语义意义的领域特定方面,值得拥有自己的词汇,或者足够简单以被微数据覆盖,否则它可能只是被良好的搜索排名算法视为垃圾内容的噪音。
从站长的角度来看,根本的区别是
schema.org + 微数据适用于搜索上下文中重要的内容
微格式适用于最简单的内容片段,不值得语法开销
其他词汇 + RDFa 用于通过在搜索上下文之外具有特定领域意义的解析器来利用语义内容
所有这三者在 XHTML 中也能很好地融合,例如,从将博客作为提要服务的类比中,这很有用。
这里的关键点是,选择微数据比早起采用它有更好的理由,同时尊重早期、更广泛成功部署的手段。

Microdata is RDFa reborn tougher as seen from support to CURIEs being absent. schema.org addresses only the cross-cutting concern of search. Unless the content relates to domain specific aspects with semantic significance that merits it's own vocab or is simple enough to be covered by microdata, it might be just noise treated as spammy content by good search rank algorithm.
The fundamental difference from webmaster viewpoint is
schema.org + microdata is for content significant in the context of search
microformats is for the simplest content pieces that don't merit syntactic overheads
other vocabs + RDFa is for semantic content to be utilized through parsers with domain-specific significance outside searching context
and all 3 blend well in XHTML too, that's useful from analogy of serving weblog as feed for instance.
Key point here is there are better reasons to opt for microdata than being early bird at adopting it, while being respectful of earlier, more widely successfully deployed means.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文