hAtom 0.1

(Difference between revisions)

Jump to: navigation, search
(Schema: added feed category, missing from schema)
Current revision (19:59, 25 August 2013) (view source)
m (Protected "hatom": protect due to vandalism [edit=sysop:move=sysop])
 
(48 intermediate revisions not shown.)
Line 1: Line 1:
-
<h1> hAtom 0.1 </h1>
+
<entry-title>hAtom 0.1</entry-title>
-
 
+
{{latest|h-entry}}
-
hAtom is a microformat for content that can be syndicated, primarily but not exclusively weblog postings. hAtom is based on a subset of the [http://www.atomenabled.org/ Atom] syndication format. hAtom is one of several [[microformats]] open standards.
+
{{Template:DraftSpecification}}
 +
hAtom is a microformat for content that can be syndicated, primarily but not exclusively weblog postings. hAtom is based on a subset of the [http://www.atomenabled.org/ Atom] syndication format. hAtom will be one of several [[microformats]] open standards.
__TOC__
__TOC__
== Draft Specification ==
== Draft Specification ==
-
;Editor/Author
+
<div class="vcard">
-
:[http://blogmatrix.blogmatrix.com/ David Janes] ([http://www.blogmatrix.com BlogMatrix, Inc.])
+
;<span class="role">Editor/Author</span>
 +
:<span class="fn">[http://blogmatrix.blogmatrix.com/ David Janes]</span> <span class="org">([http://www.blogmatrix.com BlogMatrix, Inc.])</span>
 +
</div>
;Contributors
;Contributors
-
:[http://members.optusnet.com.au/benjamincarlyle/benjamin/blog/ Benjamin Carlyle]
+
:<span class="vcard"><span class="fn">[http://members.optusnet.com.au/benjamincarlyle/benjamin/blog/ Benjamin Carlyle]</span></span>
-
:[http://tantek.com/ Tantek Çelik] ([http://technorati.com Technorati, Inc.])
+
:<span class="vcard"><span class="fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="url">http://tantek.com/</span> and before at [http://technorati.com Technorati, Inc.])</span>
-
=== Copyright ===
+
[[hatom#Copyright|copyright]] and [[hatom#Patents|patents]] statements apply.
-
{{MicroFormatCopyrightStatement2005}}
+
-
* [[User:Tantek|Tantek]]: I release all my contributions to this specification into the public domain and I encourage the other authors to do so as well.
+
-
** When all authors/editors have done so, we can remove the MicroFormatCopyrightStatement template reference and replace it with the MicroFormatPublicDomainContributionStatement.
+
-
=== Patents ===
+
== Status ==
-
{{MicroFormatPatentStatement}}
+
hAtom 0.1 is a microformats.org draft specification. Public discussion on hAtom takes place on [[hatom-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-discuss/ microformats-discuss mailing list].
-
== Introduction ==
+
=== Available languages ===
 +
The English version of this specification is the only normative version. For translations of this document see the [[#translations]] section.
 +
=== Errata and Updates ===
 +
Known errors and issues in this specification are corrected in [[hatom-issues-resolved|resolved]] and [[hatom-issues-closed|closed]] issues. Please check there before reporting [[hatom-issues|issues]].
 +
 +
The hAtom 0.2 update is currently under development and incorporates known errata corrections as well as the [[value-class-pattern]].
 +
 +
== Introduction ==
hAtom is a [[microformat]] for identifying semantic information in weblog posts and practically any other place [http://www.atomenabled.org/ Atom] may be used, such as news articles. hAtom content is easily added to most blogs by simple modifications to the blog's template definitions.
hAtom is a [[microformat]] for identifying semantic information in weblog posts and practically any other place [http://www.atomenabled.org/ Atom] may be used, such as news articles. hAtom content is easily added to most blogs by simple modifications to the blog's template definitions.
{{rfc-2119-intro}}
{{rfc-2119-intro}}
-
== Semantic XHTML Design Principles ==
+
== Example ==
-
{{semantic-xhtml-design-principles}}
+
Here is a simple blog post example:
 +
 
 +
<source lang=html4strict>
 +
<article class="hentry">
 +
  <h1 class="entry-title">Microformats are amazing</h1>
 +
  <p>Published by <span class="author vcard"><span class="fn">W. Developer</span></span>
 +
    on <time class="published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time>
 +
 
 +
  <p class="entry-summary">In which I extoll the virtues of using microformats.</p>
 +
 
 +
  <div class="entry-content">
 +
    <p>Blah blah blah</p>
 +
  </div>
 +
</article>
 +
</source>
 +
 
 +
=== Get started ===
 +
The class '''<code>hentry</code>''' is a ''root class name'' that indicates the presence of an hAtom entry.
 +
 
 +
'''<code>entry-title</code>''', '''<code>author</code>''', '''<code>published</code>''', '''<code>entry-summary</code>''', '''<code>entry-content</code>''' and the other hAtom property classnames listed below define properties of the entry.
== Format ==
== Format ==
Line 45: Line 71:
* hfeed ('''<code>hfeed</code>'''). optional.
* hfeed ('''<code>hfeed</code>'''). optional.
** '''<code>feed category</code>'''. optional. keywords or phrases, using '''[[rel-tag]]'''.
** '''<code>feed category</code>'''. optional. keywords or phrases, using '''[[rel-tag]]'''.
-
** hentry ('''<code>hentry</code>''').  
+
** [[hentry]] ('''<code>hentry</code>''').  
*** '''<code>entry-title</code>'''. required. text.
*** '''<code>entry-title</code>'''. required. text.
*** '''<code>entry-content</code>'''. optional (see field description). text. [*]
*** '''<code>entry-content</code>'''. optional (see field description). text. [*]
*** '''<code>entry-summary</code>'''. optional. text.
*** '''<code>entry-summary</code>'''. optional. text.
-
*** '''<code>updated</code>'''. required using [[datetime-design-pattern]]. [*]
+
*** '''<code>updated</code>'''. required using [[value-class-pattern#Date_and_time_parsing|value class pattern date and time]]. [*]
-
*** '''<code>published</code>'''. optional using [[datetime-design-pattern]].
+
*** '''<code>published</code>'''. optional using [[value-class-pattern#Date_and_time_parsing|value class pattern date and time]].
*** '''<code>author</code>'''. required using '''[[hcard|hCard]]'''. [*]
*** '''<code>author</code>'''. required using '''[[hcard|hCard]]'''. [*]
*** '''<code>bookmark</code>''' (permalink). optional, using '''[[rel-bookmark]]'''.
*** '''<code>bookmark</code>''' (permalink). optional, using '''[[rel-bookmark]]'''.
Line 98: Line 124:
* an Entry Content element represents the concept of an [http://www.atomenabled.org/developers/syndication/atom-format-spec.php#atomContent Atom content]
* an Entry Content element represents the concept of an [http://www.atomenabled.org/developers/syndication/atom-format-spec.php#atomContent Atom content]
* an Entry {{may}} have 0 or more Entry Content elements. The "logical Entry Content" of an Entry is the concatenation, in order of appearance, of all the Entry Contents within the Entry
* an Entry {{may}} have 0 or more Entry Content elements. The "logical Entry Content" of an Entry is the concatenation, in order of appearance, of all the Entry Contents within the Entry
-
: ''Many weblogs split content into multiple sections with a "Read More" link and javascript tricks. This is also needed in cases where Entry Titles are coded inline and are considered part of the content.''
+
: ''Many web logs split content into multiple sections with a "Read More" link and JavaScript tricks. This is also needed in cases where Entry Titles are coded in-line and are considered part of the content.''
* if the Entry Content is missing, assume it is the empty string
* if the Entry Content is missing, assume it is the empty string
Line 116: Line 142:
* an Entry Updated element represents the concept of [http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.2.15 Atom updated]
* an Entry Updated element represents the concept of [http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.2.15 Atom updated]
* an Entry {{should}} have an Entry Updated element
* an Entry {{should}} have an Entry Updated element
-
* use the [[datetime-design-pattern]] to encode the updated datetime
+
* use the [[value-class-pattern#Date_and_time_parsing|value class pattern date and time]] to encode the updated datetime
* if there is no Entry Updated element,
* if there is no Entry Updated element,
** use the Entry Published element, if present
** use the Entry Published element, if present
Line 124: Line 150:
* an Entry Published element is identified by the class name <code>published</code>
* an Entry Published element is identified by the class name <code>published</code>
* an Entry Published element represents the concept of [http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.2.9 Atom published]
* an Entry Published element represents the concept of [http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.2.9 Atom published]
-
* use the [[datetime-design-pattern]] to encode the published datetime
+
* use the [[value-class-pattern#Date_and_time_parsing|value class pattern date and time]] to encode the published datetime
===== Entry Author =====
===== Entry Author =====
Line 138: Line 164:
=== XMDP Profile ===
=== XMDP Profile ===
-
<pre>
+
See [[hatom-profile]].
-
<dl class="profile">
+
-
<dt>class</dt>
+
-
<dd><p>
+
-
  <a rel="help" href="http://www.w3.org/TR/html401/struct/global.html#adef-class">
+
-
  HTML4 definition of the 'class' attribute.</a>
+
-
  This meta data profile defines some 'class' attribute values (class names)
+
-
  and their meanings as suggested by a
+
-
  <a href="http://www.w3.org/TR/WD-htmllink-970328#profile">
+
-
  draft of "Hypertext Links in HTML"</a>.
+
-
  <dl>
+
-
  <dt>hfeed</dt>
+
-
  <dd>
+
-
    The concept of atom:feed from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>hentry</dt>
+
-
  <dd>
+
-
    The concept of atom:entry from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>entry-title</dt>
+
-
  <dd>
+
-
    The concept of atom:title inside of an atom:entry from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>entry-content</dt>
+
-
  <dd>
+
-
    The concept of atom:content from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>entry-summary</dt>
+
-
  <dd>
+
-
    The concept of atom:summary from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>bookmark</dt>
+
-
  <dd>
+
-
    The concept of atom:link (without any "rel") with an atom:entry from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>published</dt>
+
-
  <dd>
+
-
    The concept of atom:published from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>updated</dt>
+
-
  <dd>
+
-
    The concept of atom:updated from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  <dt>author</dt>
+
-
  <dd>
+
-
    The concept of atom:author from
+
-
    <a href="http://www.atomenabled.org/developers/syndication/atom-format-spec.php">The Atom Syndication Format</a>,
+
-
    constrained and modified as per the <a href="http://microformats.org/wiki/hatom">hAtom microformat spec</a>.
+
-
  </dd>
+
-
  </dl>
+
-
</dd>
+
-
</dl>
+
-
</pre>
+
== Examples ==
== Examples ==
Line 218: Line 176:
== Implementations ==
== Implementations ==
-
This section is '''informative'''.
+
See [[hatom-implementations]].
-
The following implementations have been developed which either generate or parse hAtom links. If you have an hAtom implementation, feel free to add it to the '''top''' of this list. Once the list grows too big, we'll make a separate wiki page.
+
== Copyright ==
-
<!--
+
{{MicroFormatCopyrightStatement2005}}
 +
* [[User:Tantek|Tantek]]: I release all my contributions to this specification into the public domain and I encourage the other authors to do so as well.
 +
** When all authors/editors have done so, we can remove the MicroFormatCopyrightStatement template reference and replace it with the MicroFormatPublicDomainContributionStatement.
-
    add new items to the TOP of this list
+
== Patents ==
 +
{{MicroFormatPatentStatement}}
-
-->
+
== Semantic HTML Design Principles ==
-
* [http://spinn3r.com/opensource.php Spinn3r Open Source] - implemented in Spinn3r and part of [http://code.tailrank.com/feedparser FeedParser]
+
<div id="Semantic_XHTML_Design_Principles">{{semantic-html-design-principles}}</div>
-
* [http://dichotomize.com/uf/hatom/creator.html hAtom Creator] modified from the other creators by BenWest.
+
-
** appears to have broken as of 14 Oct 2007. returns 404, as does each parent directory. site returns default Apache install home page.
+
-
* the [http://tools.blogmatrix.com/extract/ Almost Universal Microformat Parser] can extract hAtom content from webpages ([http://tools.blogmatrix.com/extract/?uri=http%3A%2F%2Fblog.davidjanes.com&microformat=hatom&submit=Submit example])
+
-
* the [http://www.trinityanne.com/tools/greasemonkey/microformat-action.user.js microformat-action] [[greasemonkey|Greasemonkey]] script detects hAtom content on webpages and will call the [http://tools.blogmatrix.com/extract/ Almost Universal Microformat Parser]
+
-
* [http://rbach.priv.at/hAtom2Atom/ hAtom2Atom.xsl] transforms hAtom to Atom (as the name suggests.)
+
-
* There is now an [http://www.lukearno.com/projects/hatom2atom/ hatom2atom proxy] that uses hAtom2Atom.xsl.
+
-
* [http://placenamehere.com/article/185/SubscribingTohAtomFeedsWithNetNewsWire Subscribe To hAtom] is a script that provides [http://ranchero.com/netnewswire/ NetNewsWire 2.x] users with the ability to subscribe to hAtom documents as they would any other feed. by [[User:ChrisCasciano|Chris Casciano]].
+
-
* [http://boxtheweb.mihopa.net/code/apis/#outlineclasses Outline Classes] - has GPL'ed PHP code for reading hAtom
+
-
* [http://boxtheweb.4x2.net/ BoxtheWeb] - supports subscribing to hAtom as a feed format
+
-
<!--
+
-
 
+
-
    add new items to the TOP of this list
+
-
 
+
-
-->
+
== References ==
== References ==
Line 252: Line 199:
=== Informative References ===
=== Informative References ===
* [http://www.atomenabled.org/ atomenabled.org]
* [http://www.atomenabled.org/ atomenabled.org]
 +
 +
== Further Reading ==
 +
* [http://www.ablognotlimited.com/articles/getting-semantic-with-microformats-part-5-hatom/ Getting Semantic With Microformats, Part 5: hAtom] by [http://www.ablognotlimited.com/ Emily Lewis]
== Work in progress ==
== Work in progress ==
Line 278: Line 228:
* [[blog-post-formats]]
* [[blog-post-formats]]
* [[blog-post-examples]]
* [[blog-post-examples]]
 +
* [[blog-post-feed-equivalence]]
* [[blog-description-format]] - how to describe a blog (as opposed to the individual entries, which is what we're doing here)
* [[blog-description-format]] - how to describe a blog (as opposed to the individual entries, which is what we're doing here)
 +
* [[xhtml-syndication]]
 +
 +
[[Category:Draft Specifications]]
 +
[[Category:hAtom]]
 +
 +
== Translations ==
 +
Read the hAtom draft specification in additional <span id="languages">languages</span>:
 +
* [[hatom-fr|français]]

Current revision

See latest version: h-entry

This document represents a draft microformat specification. Although drafts are somewhat mature in the development process, the stability of this document cannot be guaranteed, and implementers should be prepared to keep abreast of future developments and changes. Watch this wiki page, or follow discussions on the #microformats Freenode IRC channel to stay up-to-date.

hAtom is a microformat for content that can be syndicated, primarily but not exclusively weblog postings. hAtom is based on a subset of the Atom syndication format. hAtom will be one of several microformats open standards.

Contents

Draft Specification

Editor/Author
David Janes (BlogMatrix, Inc.)
Contributors
Benjamin Carlyle
Tantek Çelik (http://tantek.com/ and before at Technorati, Inc.)

copyright and patents statements apply.

Status

hAtom 0.1 is a microformats.org draft specification. Public discussion on hAtom takes place on hatom-feedback, the #microformats irc channel on irc.freenode.net, and microformats-discuss mailing list.

Available languages

The English version of this specification is the only normative version. For translations of this document see the #translations section.

Errata and Updates

Known errors and issues in this specification are corrected in resolved and closed issues. Please check there before reporting issues.

The hAtom 0.2 update is currently under development and incorporates known errata corrections as well as the value-class-pattern.

Introduction

hAtom is a microformat for identifying semantic information in weblog posts and practically any other place Atom may be used, such as news articles. hAtom content is easily added to most blogs by simple modifications to the blog's template definitions.

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.

Example

Here is a simple blog post example:

<article class="hentry">
  <h1 class="entry-title">Microformats are amazing</h1>
  <p>Published by <span class="author vcard"><span class="fn">W. Developer</span></span>
     on <time class="published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time>
 
  <p class="entry-summary">In which I extoll the virtues of using microformats.</p>
 
  <div class="entry-content">
    <p>Blah blah blah</p>
  </div>
</article>

Get started

The class hentry is a root class name that indicates the presence of an hAtom entry.

entry-title, author, published, entry-summary, entry-content and the other hAtom property classnames listed below define properties of the entry.

Format

In General

The Atom Syndication Format provides the conceptual basis for this microformat, with the following caveats:

Schema

Schema elements are based on the Atom nomenclature and follow the microformat pattern of prefixing a unique identifier (in this case, 'h') on the outermost container elements -- the Feed or Entry. The parts of this microformat are based on analysis of many weblog, bulletin board and media posts and can be read blog-post-brainstorming#Discovered_Elements.

The hAtom schema consists of the following:

[*] Some required elements have defaults if missing, see below.

Field and Element Details

Feed
Feed Category
Entry
This allows quoting other microformated data without worry of corrupting the model
Entry Category
Entry Title
Entry Content
Many web logs split content into multiple sections with a "Read More" link and JavaScript tricks. This is also needed in cases where Entry Titles are coded in-line and are considered part of the content.
Entry Summary
Entry Permalink
Entry Updated
Entry Published
Entry Author

XMDP Profile

See hatom-profile.

Examples

See hatom-examples.

Examples in the wild

See hatom-examples-in-wild.

Implementations

See hatom-implementations.

Copyright

This specification is (C) 2005-2017 by the authors. However, the authors intend to submit (or already have submitted, see details in the spec) this specification to a standards body with a liberal copyright/licensing policy such as the GMPG, IETF, and/or W3C. Anyone wishing to contribute should read their copyright principles, policies and licenses (e.g. the GMPG Principles) and agree to them, including licensing of all contributions under all required licenses (e.g. CC-by 1.0 and later), before contributing.

Patents

This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.

Semantic HTML Design Principles

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported microformats.
  2. When new schema are needed, reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported other formats/standards by incorporation, following the microformats naming-principles. Re-do constraints expressed in the source standard from the perspective of microformats design principles and designed primarily for web authoring. Informatively mention source standard for reference purposes.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  3. Use the most accurately precise semantic HTML building block for each object etc.
  4. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  5. Use class names based on names from the original schema, unless the semantic HTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  6. Finally, if the format of the data according to the original schema is too long but still human readable/listenable, use <abbr> instead of a generic structural element, and place the literal longer data into the 'title' attribute (where abbr expansions go), and the briefer equivalent into the contents of the element itself. If however, the format of the literal longer data data is not human-friendly, instead of <abbr>, use the value-class-pattern or HTML5 <time>/<data> elements as most semantically appropriate.

References

Normative References

Informative References

Further Reading

Work in progress

This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. There is a separate document where we are keeping our brainstorms and other explorations relating to hAtom:

Version 0.1

Version 0.1 was released 28 February 2006.

Discussions

Q&A

Issues

See Also

Translations

Read the hAtom draft specification in additional languages:

Categories

hAtom 0.1 was last modified: Sunday, August 25th, 2013

Views