RDF,RDFa,微格式和微数据之间是什么关系 [英] What is the relationship between RDF, RDFa, Microformats and Microdata

查看:147
本文介绍了RDF,RDFa,微格式和微数据之间是什么关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了很多研究,但是我不了解这3个之间的确切关系.而且,既然W3C正式认可了RDFa,那么考虑到它与Microdata的功能相匹配,您会推荐它在Microdata上吗?还有更多?

I've done quite a bit of research but I can't understand the exact relationship between the 3. Also, now that W3C has officially recognised RDFa, would you recommend it over Microdata, taking into consideration that it matches Microdata's features and more?

推荐答案

< sarcasm>我无法想象您会发现如此令人困惑的</sarcasm>(这些标签以前是不可见的)

<sarcasm>I can't imagine what you find so confusing</sarcasm> (edit: these tags were invisible before)

非常简短:

  • 微格式,一种将html页面用作人类可读文档机器可读数据的方式,无需重复(例如,将CSV粘贴在头元素).
  • RDF 一种为Web设计的数据模型.无模式,使用URL来命名类型和关系.
  • RDFa 一种遵循html格式(即减少重复)的方法来编码(写入)html中的RDF.通过向html添加一些属性来工作.
  • 微数据是RDFa的替代方法,它使用不同的属性和不同的数据模型.
  • Microformats A way to use html pages as both a human readable document and machine readable data, without repetition (e.g. sticking CSV in the head element).
  • RDF A data model designed for the web. Schemaless, uses URLs to name types and relations.
  • RDFa A way to encode (write) RDF in html, following the style of microformats (i.e. minimising repetition). Works by adding a few attributes to html.
  • Microdata An alternative to RDFa, using different attributes and a different data model.

简短地说,RDF来自使数据成为"webby"的尝试.甚至有一个插件可以浏览RDF的前身MCF(奇怪的是,来自Apple).数据模型经过精心设计,因此您可以编写所需的内容,而无需与网络上的其他所有人预先安排如何对名称或主要含义进行列式设置. RDF是使用XML进行标准编写(序列化)的(尽管可以使用其他更舒适的格式).

Less briefly, RDF came from attempts to make data 'webby'. There was even a plug-in for browsing RDF's precursor MCF (from Apple, curiously). The data model was designed so that you could write what you want without having to pre-arrange how to column names or key meanings with everyone else on the web. RDF was standardly written (serialised) using XML (although other, more pleasant, formats are available).

因此,在这个世界上,您可能有一个可读的主页(me.html)和一个数据主页(me.rdf),以便计算机获取信息.这些机器不了解<p>I live in <a href="http://example.com/Chicago">Chicago</a></p>的含义,但是如果它们查找'livesIn',它们也许可以使用:me ex:livesIn <http://example.com/Chicago>.

So in this world you might have a readable homepage (me.html) and a data homepage (me.rdf) for machines to scoop up. Those machines won't understand the meaning of <p>I live in <a href="http://example.com/Chicago">Chicago</a></p>, but they might be able to use :me ex:livesIn <http://example.com/Chicago> if they look up 'livesIn'.

微格式还尝试将数据设置为"webby",或者应该将其设置为Web"data-y".这里的见解是散文之间的网页中有很多数据.如果您有一些提示,一台机器可以算出上面的那段html基本上是一个地址.这些提示是微格式.通常,他们使用围绕html类名称的约定来表示内容多于文本.

Microformats also tries to make data 'webby', or perhaps that should be the web 'data-y'. The insight here is that there's a lot of data in web pages, between the prose. If you have a few hints a machine can work out that that piece of html above is basically an address. Those hints are microformats. Typically they use conventions around html class names to indicate that the content is more than text.

因此,微格式不需要为机器提供单独的网页.但是,由于微格式的工作方式,它们仅涵盖了几种类型的数据(地址,朋友链接,位置...).每个都是需要达成一致的特定约定.如果使用不当,它们的混合效果也会很差.

So microformats don't need a separate web page for machines. But microformats only cover a few types of data (addresses, friend links, position...) because of the way they work. Each is a particular convention which needs to be agreed. Used without care they can mix badly, too.

RDFa试图同时获得RDF的灵活性和微格式的简单性. 微数据是对RDFa的响应,但是具有不同的数据模型(大致是数组和哈希,而不是关系模型).与微格式不同,这两种格式都没有决定提供哪种类型的信息,也没有规定如何编码.

RDFa is an attempt to get both the flexibility of RDF and the simplicity of microformats. Microdata was a response to RDFa, but with a different data model (roughly arrays and hashes rather than a relational model). Unlike microformats neither dictate what sort of information is provided, just how it is encoded.

为了完成所缺少的内容,我们现在有了schema.org,这是大型搜索引擎(Google,Bing,Yahoo,Yandex)发起的一项索引,用于对Web数据进行索引. schema.org协调了这些含义,因此搜索引擎知道事件具有位置.微数据最初由schema.org使用,但现在同时支持微数据和RDFa.

To complete what's missing we now have schema.org, which is an initiative from the big search engines (Google, Bing, Yahoo, Yandex) to index web data. schema.org coordinates those meanings so the search engine knows that, say, events have locations. Microdata was originally used by schema.org, but now both microdata and RDFa are supported.

这些天我会忽略微格式,而选择schema.org.我的个人爱好是RDFa编码,但是无论是它还是微数据都应该可以正常工作.

I'd ignore microformats these days and go for schema.org. My personal taste is the RDFa encoding, but either it or microdata should work fine.

这篇关于RDF,RDFa,微格式和微数据之间是什么关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆