html5-profile: Difference between revisions
ManuSporny (talk | contribs) m (Minor languages changes to RDFa Example section) |
m (Replace <entry-title> with {{DISPLAYTITLE:}}) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:HTML5 profile attribute}} | |||
The <dfn style="font-style:normal;font-weight:bold">HTML5 profile attribute</dfn> is a simple way for authors define URLs and meanings for vocabularies used in an element and its descendants. It is based on and generalizes the HTML4 head element's profile attribute for all elements. | The <dfn style="font-style:normal;font-weight:bold">HTML5 profile attribute</dfn> is a simple way for authors to define URLs and meanings for vocabularies used in an element and its descendants. It is based on and generalizes the HTML4 head element's profile attribute for all elements. | ||
< | ; Editors | ||
: <span profile="http://microformarts.org/profile/hcard" class="vcard"><span class="fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="url">http://tantek.com/</span>)</span> | |||
: <span profile="http://microformarts.org/profile/hcard" class="vcard"><span class="vcard"><span class="fn"> [[User:ManuSporny | Manu Sporny]]</span> ([http://www.bitmunk.com/ Bitmunk] - [http://blog.digitalbazaar.com Digital Bazaar], Inc.)</span></span> | |||
</ | |||
[[#Copyright|copyright]] and [[#Patents|patents]] statements apply. | [[#Copyright|copyright]] and [[#Patents|patents]] statements apply. | ||
Line 42: | Line 39: | ||
== Format == | == Format == | ||
formal definition of the profile attribute, processing model. | EDITORS NOTE: filling in formal definition of the profile attribute, processing model. | ||
The profile attribute contains a space separated ordered list of URLs to one or more profile documents. | The profile attribute contains a space separated ordered list of URLs to one or more profile documents. | ||
Line 48: | Line 45: | ||
These profile documents define and provide URLs for vocabulary terms - profile definitions. | These profile documents define and provide URLs for vocabulary terms - profile definitions. | ||
These profile definitions apply to the element and its descendants. | These profile definitions apply to the element and its descendants as follows: | ||
* an element's computed list of profile URLs consists of its profile attribute's ordered list of profile URLs, and if the element has a parent, followed by the parent's computed list of profile URLs. | |||
For backwards compatibility with HTML4 and XHTML1: | For backwards compatibility with HTML4, XHTML1, and XHTML1.1: | ||
* profile URLs specified on | * profile URLs specified on a head element in an HTML document are considered to be at the end of the list of profile URLs of the html element, and thus apply to the entire HTML document. | ||
... | ... | ||
Line 66: | Line 64: | ||
=== RDFa example === | === RDFa example === | ||
<source lang=html4strict> | <source lang=html4strict> | ||
<div profile="http://microformats.org/wiki/hcard#" typeof="vcard"> | <div profile="http://microformats.org/wiki/hcard#" typeof="vcard"> | ||
Line 76: | Line 73: | ||
<source lang=text> | <source lang=text> | ||
_: | _:subject0 | ||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | ||
<http://microformats.org/wiki/hcard#vcard> . | <http://microformats.org/wiki/hcard#vcard> . | ||
_: | _:subject0 | ||
<http://microformats.org/wiki/hcard#fn> | <http://microformats.org/wiki/hcard#fn> | ||
"Manu Sporny" . | "Manu Sporny" . | ||
_: | _:subject0 | ||
<http://microformats.org/wiki/hcard#url> | <http://microformats.org/wiki/hcard#url> | ||
<http://manu.sporny.org/> . | <http://manu.sporny.org/> . | ||
Line 88: | Line 85: | ||
=== microdata example === | === microdata example === | ||
EDITORS NOTE: add a way that microdata could use definitions provided by the profile attribute without having to use full URLs in itemtype attribute values for example. | |||
=== hybrid example === | === hybrid example === | ||
EDITORS NOTE: add an example using the profile attribute to introduce/define/scope a vocabulary and then use in microdata, microformats, and RDFa markup simultaneously, as a demonstration that they can be used on the same data in a complementary overlapping fashion. not sure of the utility of doing this but demonstrating that they can compatibly be used in the same document or even on the same element may help both alleviate incompatibility concerns, and how to use shared vocabularies across multiple syntaxes. | |||
== HTML 4.01 Errata == | == HTML 4.01 Errata == | ||
This section is '''informative'''. | This section is '''informative'''. | ||
EDITORS NOTE: include [[XMDP]] | EDITORS NOTE: include [[XMDP]] interpretations of HTML 4.01 / XHTML 1.0. | ||
The [[HTML4]] recommendation is inconsistent in its description of the [http://www.w3.org/TR/html4/struct/global.html#adef-profile profile] attribute: | The [[HTML4]] recommendation is inconsistent in its description of the [http://www.w3.org/TR/html4/struct/global.html#adef-profile profile] attribute: | ||
Line 245: | Line 242: | ||
The profile attribute as defined in this specification can be applied to other markup languages (including previous versions of HTML and XHTML) as follows. | The profile attribute as defined in this specification can be applied to other markup languages (including previous versions of HTML and XHTML) as follows. | ||
informative profile attribute processing model for other languages | EDITORS NOTE: add informative profile attribute processing model for other languages. | ||
examples of HTML4, XHTML1, SVG, and other markup languages that have a class attribute | EDITORS NOTE: add examples of HTML4, XHTML1, SVG, and other markup languages that have a class attribute. | ||
examples of Atom, and other markup languages that have a rel attribute | EDITORS NOTE: add examples of Atom, and other markup languages that have a rel attribute. | ||
EDITORS NOTE: add note/reference how other markup languages could be extended with both the profile attribute and with one or more of : microformats (by adding class and rel attributes), RDFa (by adding property, rel, and about attributes), and microdata (by adding itemscope, itemtype, itemprop, itemid, and itemref attributes). | |||
== Copyright == | == Copyright == | ||
Line 272: | Line 269: | ||
== Related Pages == | == Related Pages == | ||
* [[HTML5]] | |||
* [[profile]] | |||
* [[rel-profile]] | |||
* [[XMDP]] | * [[XMDP]] | ||
[[Category:Drafts]] | [[Category:Drafts]] | ||
Latest revision as of 16:28, 18 July 2020
The HTML5 profile attribute is a simple way for authors to define URLs and meanings for vocabularies used in an element and its descendants. It is based on and generalizes the HTML4 head element's profile attribute for all elements.
- Editors
- Tantek Çelik (http://tantek.com/)
- Manu Sporny (Bitmunk - Digital Bazaar, Inc.)
copyright and patents statements apply.
Status
HTML5 profile attribute is a work in progress!
Please note that currently several sections are incomplete and are being actively worked on.
This document may be useful for general conceptual review at this point, but nothing more formal.
Public discussion on HTML5 profile attribute takes place on html5-profile-feedback, the #microformats irc channel on irc.freenode.net, and microformats-new mailing list.
Available languages
The English version of this document is the only normative version. For translations of this document see the #translations section.
Errata and Updates
Known errors and issues in this document are corrected in resolved and closed issues. Please check there before reporting issues.
This document is currently under development.
Introduction
HTML4 introduced the profile attribute.
XMDP clarified profile attribute processing, and introduced a profile document format based on XHTML which authors could produce and link to using the HTML4 profile attribute.
microformats have XMDP profiles and recommend linking to them using the profile attribute.
HTML5 has dropped the profile attribute from the head element.
This document is an extension/addition to HTML5 which provides both a more thorough/rigorous definition of the profile attribute and generalizes it to all elements for scoped indication of vocabularies (similar to how the HTML5 microdata document extends and adds to HTML5).
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Format
EDITORS NOTE: filling in formal definition of the profile attribute, processing model.
The profile attribute contains a space separated ordered list of URLs to one or more profile documents.
These profile documents define and provide URLs for vocabulary terms - profile definitions.
These profile definitions apply to the element and its descendants as follows:
- an element's computed list of profile URLs consists of its profile attribute's ordered list of profile URLs, and if the element has a parent, followed by the parent's computed list of profile URLs.
For backwards compatibility with HTML4, XHTML1, and XHTML1.1:
- profile URLs specified on a head element in an HTML document are considered to be at the end of the list of profile URLs of the html element, and thus apply to the entire HTML document.
...
Examples
This section is informative.
hCard with scoped profile
<div profile="http://microformats.org/wiki/hcard" class="vcard">
<a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
</div>
RDFa example
<div profile="http://microformats.org/wiki/hcard#" typeof="vcard">
<a rel="url" href="http://manu.sporny.org/" property="fn">Manu Sporny</a>
</div>
would generate the following triples:
_:subject0
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://microformats.org/wiki/hcard#vcard> .
_:subject0
<http://microformats.org/wiki/hcard#fn>
"Manu Sporny" .
_:subject0
<http://microformats.org/wiki/hcard#url>
<http://manu.sporny.org/> .
microdata example
EDITORS NOTE: add a way that microdata could use definitions provided by the profile attribute without having to use full URLs in itemtype attribute values for example.
hybrid example
EDITORS NOTE: add an example using the profile attribute to introduce/define/scope a vocabulary and then use in microdata, microformats, and RDFa markup simultaneously, as a demonstration that they can be used on the same data in a complementary overlapping fashion. not sure of the utility of doing this but demonstrating that they can compatibly be used in the same document or even on the same element may help both alleviate incompatibility concerns, and how to use shared vocabularies across multiple syntaxes.
HTML 4.01 Errata
This section is informative.
EDITORS NOTE: include XMDP interpretations of HTML 4.01 / XHTML 1.0.
The HTML4 recommendation is inconsistent in its description of the profile attribute:
- The DTD specifies %URI;, which just expands to CDATA.
- On the other hand, the prose explains that
This attribute specifies the location of one or more meta data profiles, separated by white space. For future extensions, user agents should consider the value to be a list even though this specification only considers the first URI to be significant. Profiles are discussed below in the section on meta data.
Since the publication of HTML 4.01, a number of meta data profiles have been defined,
and many of them can be used in the same document. While the profile
attribute does not help in discovering which profile applies to which
part of the document, it does allow declaring which profiles
are in use, potentially triggering extended behavior in recipients.
This erratum restores consistency in HTML 4.01, explicitly allowing
multiple URIs in a single profile
attribute.
Corrections to HTML 4.01
Section 6.4 - URIs
After
URIs are represented in the DTD by the parameter entity %URI;.
add
Sets of whitespace-separated URIs are represented by the parameter entity %URIlist;.
Section 7.4.1 - The HEAD element
Replace
<tt>profile</tt> = <i>uri</i> [CT]
with
<tt>profile</tt> = <i>urilist</i> [CT]
(just replacing "uri" by "urilist", but not changing the link target)
Replace
profile %URI; #IMPLIED -- named dictionary of meta info --
with
profile %URIlist; #IMPLIED -- list of named meta info dictionaries, whitespace separated --
Update the attribute index accordingly.
Replace
This attribute specifies the location of one or more meta data profiles, separated by white space. For future extensions, user agents should consider the value to be a list even though this specification only considers the first URI to be significant. Profiles are discussed below in the section on meta data.
with
This attribute specifies the location of one or more meta data profiles, separated by white space. In case of ambiguities, profiles that appear earlier in the attribute value should be considered more significant. Profiles are discussed below in the section on meta data.
Section 7.4.4 - Meta Data Profiles
Replace
The profile attribute of the HEAD specifies the location of a meta data profile. The value of the profile attribute is a URI. User agents may use this URI in two ways:
with
The profile attribute of the HEAD specifies a set of locations of meta data profiles. The value of the profile attribute is a whitespace-separated list of URIs. User agents may use these URIs in two ways:
Section 21 - Document Type Definition
Note: the changes below apply both to the copy of the DTD in the HTML 4.01 spec, and the actual DTD files.
After the definition for URI, insert:
<!ENTITY % URIlist "CDATA" -- whitespace-separated list of Uniform Resource Identifiers, see [URI] -->
Replace the following definition:
<!ATTLIST HEAD %i18n; -- lang, dir -- profile %URI; #IMPLIED -- named dictionary of meta info -- >
with
<!ATTLIST HEAD %i18n; -- lang, dir -- profile %URIlist; #IMPLIED -- list of named meta info dictionaries, whitespace separated -- >
profile attribute for other languages
This section is informative.
The profile attribute as defined in this specification can be applied to other markup languages (including previous versions of HTML and XHTML) as follows.
EDITORS NOTE: add informative profile attribute processing model for other languages.
EDITORS NOTE: add examples of HTML4, XHTML1, SVG, and other markup languages that have a class attribute.
EDITORS NOTE: add examples of Atom, and other markup languages that have a rel attribute.
EDITORS NOTE: add note/reference how other markup languages could be extended with both the profile attribute and with one or more of : microformats (by adding class and rel attributes), RDFa (by adding property, rel, and about attributes), and microdata (by adding itemscope, itemtype, itemprop, itemid, and itemref attributes).
Copyright
Per the public domain contribution requirement of the microformats.org wiki, this specification is released into the public domain.
Patents
This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.
References
Normative References
Informative References
This section is informative.
- HTML 4.01
- XHTML 1.0 SE
- XMDP description
- HTML 4.01 Errata as documented in Extended Processing Behavior in HTML5
Related Pages
Translations
Read the HTML5 profile attribute document in additional languages:
- none yet