0

I mean the difference between:

<html xmlns:xfn="http://gmpg.org/xfn/1#">

and

<head profile="http://gmpg.org/xfn/11">

I know, what is what, but could somebody point me into details of different usage for the following usecase:

I want use in the same HTML5 file more then one metadata vocabulary, like Dublin Core, Open Graph (extended with Twitter Cards), and Schema.org. How must be defined the usage of several vocabularies: with xmlns or profile or both?

EDIT: Since the profile attribut is dropped in HTML5, instead of this is recommended to use

 <link rel="profile" href="http://gmpg.org/xfn/11" />

Anyway, the question remains in following form:

If using more then one meta vocabulary in HTML4 / XHTML / HTML5, what is the usage and difference between the kinds of adding them: through xmlns, profile or link-rel?

Community
  • 1
  • 1
Evgeniy
  • 2,337
  • 2
  • 28
  • 68
  • HTML5 does not allow the `profile` attribute at all. It allows namespace attributes in XHTML serialization (XHTML syntax) only. Regarding metadata names in HTML5, see http://wiki.whatwg.org/wiki/MetaExtensions – Jukka K. Korpela Jul 22 '14 at 06:27
  • It [isn't fully dropped](http://dev.w3.org/html5/profiles/drafts/ED-html5-profiles-20100522/#microformat-profile-document-example): but ok, i edited my question in this directon – Evgeniy Jul 22 '14 at 09:59

1 Answers1

0

I want use in the same HTML5 file more then one metadata vocabulary, like Dublin Core, Open Graph (extended with Twitter Cards), and Schema.org. How must be defined the usage of several vocabularies: with xmlns or profile or both?

In plain HTML5 (not XHTML5) documents you are not allowed to use the xmlns attribute (with a value other than http://www.w3.org/1999/xhtml), or the profile attribute.

But you don’t need those attributes in the first place.

When you want to use meta-name keywords, just go ahead. As you are not allowed to use undefined/unregistered keywords, every consumer will know how to interpret the meta tags. (In HTML 4.01., the profile attribute makes sense because keywords were not required to be registered.)

When you want to use RDFa or Microdata, just go ahead. As vocabularies (like Schema.org) rely on URIs, every consumer will know how to interpret the terms.

(RDFa 1.0 used the xmlns attribute in XHTML documents, but in RDFa 1.1 it’s deprecated and the vocab and/or prefix attributes are used.)

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360