hatom: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
Line 29: Line 29:
=== In General ===
=== In General ===


=== Nomenclature ===
=== Schema ===
Schema elements are based on the Atom nomenclature and follow the microformat pattern of prefixing a unique identifier (in this case, <code>atom</code>) 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]. Note the renaming of 'EntryGroup' to 'Feed' to be more consistent with Atom ternminology.
Schema elements are based on the Atom nomenclature and follow the microformat pattern of prefixing a unique identifier (in this case, <code>atom</code>) 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]]. Note the renaming of 'EntryGroup' to 'Feed' to be more consistent with Atom ternminology.


{| width="100%" border="1" cellspacing="0"  
{| width="100%" border="1" cellspacing="0"  
|-
|-
! Concept
! width="150" | Concept
! Atom Identifier
! Atom Identifier
! hAtom Microformat Usage
! hAtom Microformat Usage
Line 52: Line 52:
| Entry
| Entry
| <code>atom:entry</code>
| <code>atom:entry</code>
| add <code>class="atomentry"</code>
| Add <code>class="atomentry"</code>; is practical, also define <code>id="unique-identifier"</code> to the Entry.
|-
|-
| Entry Title
| Entry Title
| <code>atom:title</code>
| <code>atom:title</code>
| use <code>&lt;h#></code> in block elements, or (non-preferentially) add <code>class="title"</code> in inline elements
| Use <code>&lt;h#></code> in block elements or non-preferentially add <code>class="title"</code> in inline elements.
|-
|-
| Entry Content
| Entry Content
| <code>atom:content</code>
| <code>atom:content</code>
| add <code>class="content"</code>
| Add <code>class="content"</code> to all appropriate blocks. Multiple Entry Content blocks are logically considered one concatenated <code>atom:content</code> equivalent.
|-
|-
| Entry Summary
| Entry Summary
| <code>atom:summary</code>
| <code>atom:summary</code>
| add <code>class="summary"</code>
| Add <code>class="summary"</code> to all appropriate blocks. Multiple Entry Summary blocks are logically considered one concatenated <code>atom:summary</code> equivalent.
|-
|-
| Entry Permalink
| Entry Permalink
| <code>atom:link</code>
| <code>atom:link</code>
| add <code>class="link"</code>
| Add <code>rel="link"</code>.
|-
|-
| Entry Created
| Entry Created
| <code>atom:published</code>
| <code>atom:published</code>
| use <code>&lt;abbr class="published" title="YYYYMMYYThh:mm:ss"></code>...<code>&lt;/abbr></code>
| Use <code>&lt;abbr class="published" title="YYYYMMYYThh:mm:ss"></code>...<code>&lt;/abbr></code>, following the [[datetime-design-pattern]].
|-
|-
| Entry Author
| Entry Author
| <code>atom:author</code>
| <code>atom:author</code>
| use <code>&lt;address></code>...<code>&lt;/address></code>
| Use <code>&lt;address></code>...<code>&lt;/address></code>
|}
|}



Revision as of 16:40, 22 October 2005

hAtom

hAtom is a microformat for content that can be syndicated, primarily but not exclusively weblog postings. hAtom is a strongly based on a subset of the Atom syndication format; every concept in hAtom has a corresponding definition in Atom.

NOTE: the structure is in the process of being constructed, please give me a few days to get it in shape! DavidJanes

Draft Specification

Editor

Authors

Copyright

This specification is (C) 2004-2024 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

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

Schema

Schema elements are based on the Atom nomenclature and follow the microformat pattern of prefixing a unique identifier (in this case, atom) 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. Note the renaming of 'EntryGroup' to 'Feed' to be more consistent with Atom ternminology.

Concept Atom Identifier hAtom Microformat Usage
Feed atom:feed add class="atomfeed"
Feed Title atom:title Not defined in the first iteration of this proposal.
Feed Permalink atom:link@rel=alternate Not defined in the first iteration of this proposal.
Entry atom:entry Add class="atomentry"; is practical, also define id="unique-identifier" to the Entry.
Entry Title atom:title Use <h#> in block elements or non-preferentially add class="title" in inline elements.
Entry Content atom:content Add class="content" to all appropriate blocks. Multiple Entry Content blocks are logically considered one concatenated atom:content equivalent.
Entry Summary atom:summary Add class="summary" to all appropriate blocks. Multiple Entry Summary blocks are logically considered one concatenated atom:summary equivalent.
Entry Permalink atom:link Add rel="link".
Entry Created atom:published Use <abbr class="published" title="YYYYMMYYThh:mm:ss">...</abbr>, following the datetime-design-pattern.
Entry Author atom:author Use <address>...</address>

XMDP Profile

Parsing Details

Examples

This section is informative.

hAtom Sample

More 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

  • If you have any questions about hAtom, check the hAtom FAQ, and if you don't find answers, add your questions!

Issues

  • Please add any issues with the specification to the separate hAtom issues document.

See Also