microformats2-faq

From Microformats Wiki
Revision as of 19:55, 18 September 2011 by Tantek (talk | contribs) (more see also)
Jump to navigation Jump to search

<entry-title>microformat 2 FAQ</entry-title>

Frequently asked questions and or issues about microformats-2.

does microformats 2 combine vocabularies and syntax

Q: Does microformats 2 combine vocabularies and syntax?

A: No. From a parsing perspective, microformats 2 syntax is independent of any particular vocabulary. There are some microformats-2-brainstorming proposals that take advantage of semantic HTML to imply certain common properties (name, url, photo) but that's an extremely limited set that's been determined from common markup patterns.

does microformats 2 split vocabularies and syntax

Q: Does microformats 2 split vocabularies and syntax?

A: Yes, microformats 2 specifies a syntax for parsing microformats which is independent of any specific vocabulary. So in that sense it can be said that microformats 2 splits vocabularies and syntax.

are microformats 2 vocabularies available to other languages

Q: Are microformats 2 vocabularies available to other languages?

A: Existing microformats vocabularies have profiles which are already available to other languages. Each term is defined by a URL ending in a hash and the term. This is due to the design of XMDP which deliberately produces such URLs which are compatible with microdata, RDF, and any other LinkedData system. microformats 2 vocabularies will use the same profile format and thus also be available to other languages.

how do you convert a microformats 2 example to RDFa syntax

Q: How do you convert a microformats 2 example to RDFa 1.1 syntax?

A: In short you have to use the 'typeof' attribute for the microformats 2 root class name, and use the 'property' attribute for microformats 2 properties.

E.g. this from the microformats 2 page:

<h1 class="h-card">
 <span class="p-fn">
  <span class="p-given-name">Chris</span>
  <abbr class="p-additional-name">R.</abbr>
  <span class="p-family-name">Messina</span>
 </span>
</h1>

Here is the same markup with RDFa 1.1 syntax, using an implied or explicit RDFa Profile from somewhere else (undefined):

<h1 typeof="h-card">
 <span property="p-fn">
  <span property="p-given-name">Chris</span>
  <abbr property="p-additional-name">R.</abbr>
  <span property="p-family-name">Messina</span>
 </span>
</h1>

The similarity of these two markup examples implies that it may be possible to extend RDFa 1.1 compliant parsers to become compliant microformats 2 parsers.

see also