hatom

(Difference between revisions)

Jump to: navigation, search
(Entry Published: cleaning up class name verbiage)
(In General)
Line 33: Line 33:
* Atom provides a lot more functionality that we need for a "blog post" microformat, so we've taken the minimal number of elements needed.
* Atom provides a lot more functionality that we need for a "blog post" microformat, so we've taken the minimal number of elements needed.
* the "logical" model of hAtom is that of Atom. If there is a conflict, Atom should be taken as correct.
* the "logical" model of hAtom is that of Atom. If there is a conflict, Atom should be taken as correct.
-
* the "physical" model of hAtom -- the actual writing of elements -- is a lot more varied than Atom provides for, due to the variety of ways weblogs are actually produced in the wild. The hAtom microformat provides a number of rules for "briding the gap"
+
* the "physical" model of hAtom -- the actual writing of elements -- is a lot more varied than Atom provides for, due to the variety of ways weblogs are actually produced in the wild. The hAtom microformat provides a number of rules for "bridging the gap"
=== Schema ===
=== Schema ===

Revision as of 08:25, 5 February 2006

hAtom

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.

This microformat is a draft; please address your concerns, issues, comments, etc. in hatom-issues.

Contents


Draft Specification

Editor/Author

Contributors

Copyright

This specification is (C) 2005-2020 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.

Introduction

@TODO - we need an intro here

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    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.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. 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>).
  4. Use class names based on names from the original schema, unless the semantic XHTML 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.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved

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.

Nomenclature

Note: Please see the hatom-issues document for discussion on property names.

Concept Atom Identifier hAtom Microformat Usage
Feed atom:feed Add class="hfeed"
Entry atom:entry Add class name hentry; if practical, also define id="unique-identifier" to the Entry.
Entry Title atom:title Add class name headline. Using <h#> also is encouraged.
Entry Content atom:content Add class name content to all appropriate blocks. Multiple Entry Content blocks are logically considered one concatenated atom:content equivalent.
Entry Summary atom:summary Add class name excerpt to all appropriate blocks. Multiple Entry Summary blocks are logically considered one concatenated atom:summary equivalent.
Entry Permalink atom:link Add a rel value of bookmark.
Entry Published atom:published Use class name published, optionally with the datetime-design-pattern.
Entry Updated atom:updated Use class nameupdated, with an ISO8601 absolute datetime, optionally with the datetime-design-pattern.
Entry Author atom:author Add class name "author. Using an address element is recommended. A hCard SHOULD be added.

Nesting Rules

Concept Nests In hAtom Opaque Cardinality Logical Cardinality
Informative
Feed HTML document No 1-N 1-N
Entry Feed No 0-N 0-N
Entry Title Entry
Entry Permalink
No 0-N 0-1
Entry Content Entry Yes 0-N 0-1
Entry Summary Entry Yes 0-N 0-1
Entry Permalink Entry
Entry Title
Entry Published
No 0-N 1
Entry Published Entry
Entry Permalink
No 0-N 0-1
Entry Updated Entry
Entry Permalink
No 0-N 1
Entry Author Entry Yes 0-N 1-N
hAtom Opaque

"hAtom Opaque" specifies whether a hAtom parser should not "look inside" the element for further hAtom content. If there are multiple rules applied to the same element take the OR of the two (i.e. "Yes/Opaque" always wins)

hAtom Opaque is designed to make parsing rules less ambiguous. In particular, it allows "quoted" hAtom elements (from another blog being blockquoted, for example) ti be ignored. It also allows 'embedded' hAtom to be potentially delivered within hAtom itself, and to prevent accidental 'leaking' of other microformat information up into the hAtom container. A general concept of opaqueness (need link) has also been proposed but it will complement, not replace this.
Cardinality

How many times can an element of the given type appear in it's nesting/parent element.

Logical Cardinality

This column is informative -- Atom has a number of rules for deciding what is required depending on the context and other elements, many which aren't strictly applicable to here.

From a modeling/logical perspective, the number of times can an element appear.

This is all rule dependent, see below. For example, an Entry Permalink may appear 6 times, but each one must be the same value; an Entry Content element may appear 3 times, but they are all concatenated together to make a single logical element.


Rules and Definitions

See the Nesting Rules section above for placement of these elements.

Feed
In particular, as a container for Entrys.
This may happen on news pages, or weblogs with "mini-blogs" on the sidebar.

DavidJanes: We need to work on this section. Is hfeed always going to be required?

Entry
Entry Title
Entry Content
We recognize this varies from the Atom spec: see the next rule.
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.
Otherwise it should be marked as Entry Summary.
Entry Summary
We recognize this varies from the Atom spec: see the next rule.
Entry Permalink
The intention of the previous two rules to gently force people to use strings that can be byte compared for equivalence. In general, the canonical URI should be the link used in an Atom entry.
This rule is needed for media pages (i.e. a news article on cnn.com). There is some ugliness of with this because the URI could be non-canonical.
Disambiguation
Entry Published
This is to be consistent with the Atom Datetime Construct.
Disambiguation
Entry Updated
This is to be consistent with the Atom Datetime Construct.
Entry Published is more often available in weblog templates, so we're going with that.
This is because a published element is required. Suggestions would be appreciated here.
This is a little uglier for the reader, but it's possible.
Disambiguation
Entry Author
If it does not, just consider the text to effectively be the FN. hReview also considers a hCard to be a SHOULD, not a MUST.
Atom requires at least one Author

Categories and Tags

This section needs a lot more work.

XMDP 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>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>excerpt</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:updatedfrom 
    <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>


Examples

See hatom-examples.

Examples in the wild

This section is informative.

Implementations

This section is informative.

References

Normative References

Informative References

Specifications That Use hAtom

Similar Work

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:


Discussions

Q&A

Issues

Recent Changes

Most recent at top please. This section will eventually be removed but should be helpful for people tracking changes during specing.

See Also

hatom was last modified: Wednesday, December 31st, 1969

Views