维基专题:微格式
此维基专题目前不活跃。 如果您目前不是该专题的成员,请考虑加入该专题来帮忙。如果活动恢复,或此模板更改错误,则此状态可能会更改。 |
快捷方式 | UF |
---|---|
分类 | 使用微格式的模板 |
维基共享资源 | Templates generating microformats |
用户框 | {{User Pigsonthewing Microformats}} |
什么是微格式?
[编辑]微格式(Microformat),是通过语意相关让内容人机可读。网页上的允许的微格式数据包括事件、人物、地点等,它可以被其他的软件检测到,并提取出相应的信息,以及对信息进行索引,搜索,跨平台的参考,把这些信息以其他形式重复使用或组合。
从技术上来说,这些数据是一些语义标记,用标准的(X)HTML中的class名称设置。他是开放、可用、自由的,可以被任何人使用。
例如一个地理坐标:52.48,-1.89,普通人无法理解这些数字的含义。现在我们可以把它做成微格式(geo),表示如下:
<span class="geo"><span class="latitude">52.48</span>, <span class="longitude">-1.89</span></span>
这样机器就可以正确地理解这些数字的含义,可以对他进行索引,在地图上看他的位置,把它导出到GPS设备,以及其他的用途。
其他还有很多的微格式,还有很多正在开发阶段。
Firefox3和[1][2]Internet Explorer8都将可能支持微格式。[3]
在维基百科上如何使用微格式?
[编辑]可以通过模板在单个页面上使用微格式。这也就是说一般的编辑者不需要知道如何使用这些复杂的微格式标记,只需要知道如何使用模板就可以。大部分的模板都需要做一些小修改,为目前的内容增加上微格式的标记。
Firefox 浏览器可以通过使用 Operator、Mobile 扩展读取并使用维基百科条目上的微格式数据。
microdata
[编辑]Mediawiki自1.21/wmf5起,支持"data", "time", "meta", and "link"元素
参与者
[编辑]用户框
[编辑]在用户页上使用{{User Pigsonthewing Microformats}}来表示你参与这个项目。
横幅
[编辑]在相应条目的对话页放{{ProjectMicroformats}}。
Meta templates
[编辑]For articles
[编辑]- {{UF-coord-th}} - table header for columns of coordinates using {{coord}}.
For talk pages
[编辑]模板文档
[编辑]- {{UF-hcard-geo}}
- {{UF-hcard-org}}
- {{UF-hcard-part}}
- {{UF-hcard-person}}
- {{UF-hcard-place}}
- {{UF-coord}}
分类
[编辑]相关项目
[编辑]- See also: en:Wikipedia:Metadata
- google提供的一个微格式检测工具
任务
[编辑]需要志愿者!
当前可用微格式
[编辑]Geo
[编辑]Geo 用来标记地理坐标(经度和纬度)。
Geo 可以被索引(例如"寻找距离X地点2公里范围内的所有地点"),在其他网站上看这个地点,或者为 GPS 等设备提供支持。
维基百科上所有的地点性质的条目都应该使用。
在维基百科上,{{coord}} 将 Geo 格式应用到坐标上。 它被设计用来替换 coor 模板家族,简化数据条目。
请参考:
维基百科上的 Geo 举例
[编辑]举例:
- Geo (microformat)#Example
- All of the articles using {{template:coord}} . Examples:
- Most of the articles in Category:Lists of coordinates
- Great Barr
- {{Geolinks-AUS-suburbscale}}
- GeoTemplate, which is called by many thousands of other Wikipedia pages.
- Example: the coordinates (top right) in Great Barr link to a list of maps for Great Barr; the latter now has a Geo microformat.
- 在 hCard 数据中使用 Geo 的条目列表:
- Robert Baden-Powell, 1st Baron Baden-Powell Featured Article uses {{coord}}, both "title" and "inline".
拓展
[编辑]There are three active proposals, none mutually-exclusive, and all backwards-compatible, to extend the geo microformat:
- geo-extension - for representing coordinates on other planets, moons etc., and with non-WSG84 schema
- Of use for Template:Lunar crater data
- geo-elevation - for representing altitude
- geo-waypoint - for representing routes and boundaries, using waypoints
hCard
[编辑]en:hCard可以提供人物 (人物条目和用户属性), 组织和地点的详细信息。
See Wikipedia:WikiProject Microformats/hcard for more.
hCalendar
[编辑]en:hCalendar则是提供事件的信息,可以直接把这些信息添加到日历、日程表或网站上。
维基百科上的历史上的今天栏目,新闻动态栏目应该会用的上(电视剧或电视节目?)
hAtom
[编辑]hAtom is for making feeds.
hReview
[编辑]hReview is for marking up reviews, and could be used by, for example, Template:Infobox Album.
Other
[编辑]Pseudo-microformats
[编辑]Though not formally microformats (because they have not been developed using the "microformats process", and/ or involve hidden metadata), the following are related:
Under development
[编辑]Species
[编辑]The draft species microformat has been applied to the {{Taxobox}} template (with 37,140 examples as at the time of posting).
It is recognised by the Operator extension for Firefox (using an add-in user script, itself in development).
Wikipedia editors are invited to comment on or contribute to the development of this microformat, via Template talk:Taxobox#'Species' microformat, or the "microformats-new" mailing list.
"Species" will allow the disambiguation of common names, and the lookup of species in databases, recording software, etc. - and the look up from such sites or software, on Wikipedia.
Forthcoming
[编辑]Citations
[编辑]The proposed citation microformat will obviously be very relevant to Wikipedia, both for on-page citations and bibliographies, and for allowing people to cite Wikipedia, elsewhere. See Template talk:Cite book#Use in Bibliography and User:Omegatron#COinS for work which is laying some of the groundwork for application of that microformat, once it is ready.
Citation microformats would allow the look-up of cited articles or books in libraries or shops, and the extraction of citation data for the page being voted, if it is to be cited elsewhere.
Currency
[编辑]The proposed currency microformat may be useful, especially if the suggestion to include a date field for historical amounts is included., for example, on 1922 in Germany
- "Despite the ending of cash payments for the rest of 1922, the main cause of Germany's inability to pay, the steady depreciation of the mark, was ongoing. Towards the end of the year it assumed a disastrous rapidity. On August 1, the US Dollar still stood at 643 Marks to the Dollar and the British Pound at 2,850 Marks to the Pound. But on September 5 the dollar had already risen to 1,440 Marks and the pound to 6,525 Marks, and in December the pound was worth between 30,000 and 40,000 marks and the dollar between 7,000 and 9,000."
Currency would allow automatic conversion of amounts into other currencies ("how much is that in dollars?") or time ("how much would that be today?")
Other MediaWiki uses
[编辑]Wikivoyage
[编辑]Wikivoyage is using microformats, not least in Wikivoyage listings
问题
[编辑]- We need to be able to add classes to internal and external links, to generate, for example:
<a href="example.com" class="xxx">
or:
<a href="example.com" rel="yyy">
or a combination of both, where "xxx" is a valid microformat attribute such as "url" and "yyy" is a valid rel attribute such as "directory", "tag" or "colleague" (the latter from XFN).
参考文献
[编辑]- ^ Resig, John. Microformats in Firefox 3. 2007-02-01 [2007-03-25].
- ^ Kaply, Mike. Microformats and Firefox 3 (for Developers). 2007-05-09 [2007-05-23].
- ^ Bounds, Darren. Microsoft drops hints about Internet Explorer 8. 2007-05-02 [2007-05-02].