blog-post-brainstorming: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(Added stubs for examples)
Line 147: Line 147:
== Individual Entry ==
== Individual Entry ==


This corresponds almost exactly to the <code>atom:entry</code> or <code>rss2:item</code> elements.
This corresponds almost exactly to the <code>atom:entry</code> or <code>rss2:item</code> elements. See [[http://microformats.org/wiki/blog-post-examples#Individual_Entry]] for the various forms seen in the wild.


=== Forms seen in the wild ===
=== Microformat Recommendation ===


* individual entries are within a container (commonplace)
* weblog entries MUST be enclosed in a single <code>atom:entry</code> element
* individual entries are not within a container (rare-ish)
* <code>atom:entry</code> elements MUST NOT be nested
* not all sub-elements of an individual entry are in the container (for example, the author and date may follow in a separate block)
* <code>atom:entry</code> MUST NOT not belong to more than one <code>atom:feed</code> element
 
=== Example Transformation ===
''Note that the string 'atom:entry' is a placeholder for something to be decided later.''
 
==== Entries in existing container ===
 
Original:


As the latter two forms are more happenstance than design, we believe building from the first form is best.
<pre><nowiki>
</nowiki></pre>


=== Recommendation for blog-post-format microformat ===
Transformed:


* weblog entries MUST be enclosed in a single <code>atom:entry</code> element
<pre><nowiki>
* <code>atom:entry</code> elements MUST NOT be nested
</nowiki></pre>
* <code>atom:entry</code> MUST NOT not belong to more than one <code>atom:feed</code> element
 
==== Entries not within container ====
 
Original:
 
<pre><nowiki>
</nowiki></pre>
 
Transformed:
 
<pre><nowiki>
</nowiki></pre>
 
==== Disjointed entries ====
 
Original:
 
<pre><nowiki>
</nowiki></pre>
 
Transformed:
 
<pre><nowiki>
</nowiki></pre>


== Title ==
== Title ==

Revision as of 12:56, 13 October 2005

Discussion Participants

Editors

Authors

Contributors

Purpose

The 'blog-post-microformat' proposes a codification of how blog posts are indentifies within weblogs. It is hoped that this should be considered to be 'expansive': for example, the proposal could be used on CNN.com to mark up news articles and summary pages.

Terminology

This section explores the terminology that should used to discuss a blog post microformat. To make it easier to talk about the various different types of teminology, We're using a XML-like namespace version so we can make statements like atom:entry is roughly equivalent to rss20:feed, atom:feed/atom:link@relalternate is roughly equivalent to rss20:channel/rss20:link or atom:author is not equivalent to rss:entry/rss:author (because RSS 2.0 is only the definition of an email address).

Common terminology in weblogs

Reviewing blog-post-formats#Tools, one can see that there's little standardization amongst tools or even within a individual tool (such as 'blogger') for names of elements of blog posts. There are however many common elements, including:

  • a container for all posts/entries
  • a container for individual posts
  • the post content, which can be complete, summarized with a link to the complete link, or a couple of paragraphs with javascript/CSS tricks to reveal the remainder of the content
  • the name of the author
  • the posting date (in many many formats)

Although this looks like a bit of a dog's breakfast, there is usually a fair amount of rigour behind the presentation, as Atom and/or RSS feeds can be produced also from the same tools.

Furthermore, in developing a microformat for weblog posts, we want to be careful not to break any (or many) templates. Note that many weblog templates will have to be updated as they produce somewhat crufty HTML rather than shiny XHTML.

Atom Terminology

See here for the spec and blog-post-formats#Atom for analysis.

  • atom:feed - (composite) a collection of entries plus information about them
    • atom:author - (composite) the author of a feed (may contain atom:email, atom:name, atom:uri)
    • atom:id - a permament identifier for a feed
    • atom:title - the title of an atom:entry or a atom:feed
    • atom:updated - the last time the feed was updated
    • atom:link@relalternate - the home page of a feed
    • atom:link@relself - the URI of the feed (where it can be downloaded)
    • atom:entry - (composite) an entry within the feed
      • atom:content - the feed's content
      • atom:summary - a summary of the feed's content
      • atom:entry/link - the permament URI of the entry
      • atom:published - the time of the initial creation or first availability of the entry

RSS Terminology

See here for the spec and blog-post-formats#RSS for analysis. There are a lot more elements in RSS but this covers the most commonly used ones.

  • rss2:channel - (composite) a collection of entries plus information about them
    • rss2:author - (composite) the author of a feed (may contain atom:email, atom:name, atom:uri)
    • rss2:link - The URL to the HTML website corresponding to the channel (compare to atom:link@relalternate)
    • rss2:title - the title of an rss2:channel or a rss2:item
    • rss2:pubDate - The publication date for the content in the channel.
    • rss2:item - (composite) an entry within the feed
      • rss2:item/link - The URL of the item. Note that this may not be a permalink for the item; it may be a link to some other page on the Internet that the rss2:item is about
      • rss2:description - The item synopsis [sic]. There is no special indication whether this is the full content of an entry, a summary, or a precis of what the rss2:item/link is pointing to
      • rss2:author - email address of the author of the item

Recommendation

Atom has a much more precise mechanism for defining syndication feeds and weblog data. A mechanical transformation from Atom -> RSS will always lead to a correct RSS feed; a RSS -> Atom translation would have to make a decision amongst multiple definitions that may not always be correct. For example, the format of markup, the role of an author, or the meaning of a link.

IMPORTANT: we shall talk about things such as 'marking elements atom:feed'; consider this a purely conceptual thing. The text 'atom:feed' will not appear in the XHTML microformat -- we may decide later to use the actual phrase 'atom_feed', 'feed', 'items' or 'googlybear'. In the case where there is no clear or applicable atom terminology, we shall use 'weblog:xxx'.

Discovered Elements

This section explores the information discovered from blog-post-formats using the terminology discussed above. We will only focus on the major elements of weblog posts:

  • the entry container
  • the individual entry
  • the entry title
  • the content
  • the permalink
  • the posting date
  • the modified date

For now, the codification of the following major elements will be deferred as there is/may be overlap with other microformats that should be explored further

  • the poster/author - in particular, should hcard be used?

Further input from the community would be appreciated here

EntryGroup

Roughly speaking, this corresponds to 'atom:feed' or 'rss2:channel' (in particular, the items within those XML elements). See blog-post-examples#EntryGroup for the various forms seen in the wild.

Microformat Recommendation

  • weblog pages (including home pages, archives, category pages, tag pages and so forth) that may container multiple entries MUST enclose the entries in a atom:feed element
  • weblog pages MAY have multiple atom:feed element enclosing different groups of entries
  • atom:feed elements MUST NOT be nested
  • weblog pages that have exactly on entry MAY use the atom:feed

Example Transformation

Note that the string 'atom:feed' is a placeholder for something to be decided later.

Original (obviously, if there is no existing EntryGroup block element, one can be added):

<div id="content">
 <h2 id="home-title">
  Latest microformats news 
  <a href="http://www.microformats.org/feed/" title="link to RSS feed" id="feed-link">
   <img src="/img/xml.gif" width="23" height="13" alt="XML" />
  </a>
 </h2>

 <div class="entry">
  <h3 id="post-60">
   <a href="http://www.microformats.org/blog/2005/...">Wiki Attack</a>
  </h3>
  ...
 </div>

 ...
</div>

Transformed:

<div id="content" class="atom:feed">
 <h2 id="home-title">
  Latest microformats news 
  <a href="http://www.microformats.org/feed/" title="link to RSS feed" id="feed-link">
   <img src="/img/xml.gif" width="23" height="13" alt="XML" />
  </a>
 </h2>

 <div class="entry">
  <h3 id="post-60">
   <a href="http://www.microformats.org/blog/2005/...">Wiki Attack</a>
  </h3>
  ...
 </div>

 ...
</div>

Individual Entry

This corresponds almost exactly to the atom:entry or rss2:item elements. See [[1]] for the various forms seen in the wild.

Microformat Recommendation

  • weblog entries MUST be enclosed in a single atom:entry element
  • atom:entry elements MUST NOT be nested
  • atom:entry MUST NOT not belong to more than one atom:feed element

Example Transformation

Note that the string 'atom:entry' is a placeholder for something to be decided later.

= Entries in existing container

Original:


Transformed:


Entries not within container

Original:


Transformed:


Disjointed entries

Original:


Transformed:


Title

This corresponds almost exactly to the atom:title or rss2:title elements. See blog-post-formats#Titles for examples from which we see that there are two fundemental ways titles are used in the wild: at the block level and inline. Our proposal must be capable of handling both forms.

Recommendation for blog-post-format microformat

  • atom:entrys SHOULD have at most 1 title
  • block level titles SHOULD be represented using <h#>, the first such element for in a atom:entry being considered to be the title; this need not be marked up or identified in any other way as the title
  • inline titles MUST be marked as atom:title; it is also possible to do this using block level formatting such as <div>, but this is discouraged

Example Transformation

Note that the string 'atom:title' is a placeholder for something to be decided later.

Header in <h#> block

Original (and Final):

<h2 id"post-59">Web Essentials Audio</h2>

No transformation is needed -- the blog-post microformat will recognize this as the atom:title.

Header in other block element

Original:

<div class"header">Web Essentials Audio</div>

Transformed (the header level is to taste):

<h3>Web Essentials Audio</h3>

It is possible to add class"atom:title" to the div but we recommend against it. However, we recognize rgar there may be certain BB Tools that making this change may be too difficult.

Header in inline element

Original:

<strong>Just one problem, Minister.</strong> Last week...

Transformed:

<strong class"atom:title">Just one problem, Minister.</strong> Last week...

Content

This roughly corresponds to atom:content and/or atom:summary elements.

Forms seen in the wild

  • entry with no content present -- that is, just a link and the title pointing to a different URI which may actually have content
  • entry with summary content only ([example http://www.torontosun.com/Money/home.html])
  • entry with complete content
  • entry with complete content, but the content is broken into multiple sections ([example http://www.samizdata.net/blog/] - look for "Read More" sections)

The split content problem

The last item above (content broken into multiple sections) introduces a few unique problems. It is not sufficient to enclose all the different content sections in a atom:content element, as the following example illustrates:

<code>
 <atom:entry>
  <atom:content>
   first part of the content
   "Read More"
   second part of the content
  </atom:content>
 </atom:entry>
</code>

"Read More" is not part of the content! Therefore, we propose that multiple content sections be allowed in a single atom:entry. The concatenation of all these content blocks will define the complete content:

<code>
 <atom:entry>
  <atom:content>
   first part of the content
  </atom:content>
  "Read More"
  <atom:content>
   second part of the content
  </atom:content>
 </atom:entry>
</code>

Note: once again, don't confuse <atom:content> with something we're going to actual see in the end microformat -- it's just a placeholder for a concept we're going to implement!

Recommendation for blog-post-format microformat

  • an atom:entry MAY have zero or more atom:summary sections. There is no requirement that different representations of the same entry (on different URIs) use the same summaries.
  • an atom:entry MAY have zero or more atom:content sections. The serial concatenation of all the atom:content sections within the entry MUST represent the complete content of the entry.

Permalink

Permalinks roughly correspond to atom:entry/link.

A permalink is called canonical if it is the best representation of the URI for that entry; the definition of what 'best representation' is is entirely at the discretion of the webblog's publisher. The issue of whether a URI is canonical or not adds some additional complexity to this microfomat; the value in explicitly spelling this out is that we can the use the URI without transformation to link together multiple syndication feeds and multiple XHTML copies of weblog posts together.

Forms seen in the wild

  • Permalink is around the post title
  • Permalink is at the bottom of a post
  • Permalink has an absolute URI
  • Permalink has a relative URI
  • Post has no permalink

Recommendation for blog-post-format microformat

  • weblog entries MUST have exactly one atom:entry/link
  • permalinks SHOULD be marked as atom:entry/link
  • canonical permalinks SHOULD also be marked blogpost:canonical
  • permalinks which are not canonical MUST NOT be marked blogpost:canonical
  • permalinks SHOULD be absolute URIs
  • permalinks SHOULD be canonical
  • permalinks SHOULD be the same as the atom:entry/link used in syndication feeds

Datetimes - Creation and Modified

Weblogs typically display (in HTML) the creation time of their posts (roughly but not exactly corresponding to atom:published) and not so much the last modified time (atom:updated).

Also see datetime-design-pattern for more information on specifying datetimes. The recommendation here is styled after datetimes in hcalendar.

Forms seen in the wild

See blog-post-formats#Datetimes

Recommendation for blog-post-format microformat

  • date headers between weblog entries are outside of this microformat
  • atom:published SHOULD be indicated by an abbr element around the human readable version of the date or datetime.
    • the 'class' attribute MUST indicate atom:published
    • the 'title' attribute MUST be a complete datetime, in the format of datetime-design-pattern
  • likewise for atom:updated, if present

Example transformation

Note that the string 'atom:published' is a placeholder for something to be decided later.

Original:

<a href"...">Friday, September 30th, 2005 at 12:31 pm</a>

Transformed:

<a href"..."><abbr 
 class"atom:published" 
 title"200050930T12:31:01-0500">Friday, September 30th, 2005 at 12:31 pm</abbr></a>

Possible Uses

This section describes potential applications for a blog post microformat

Transformational Uses

By transformational, we mean feeding a weblog post to some sort of transformation tool (such as XSLT) to produce a different version of the post fit for a different use.

Printing Weblog Posts

Reblogging

Archival Uses

By 'archival', we mean taking weblog entries and placing them in a database for later analysis, searching, aggregation and so forth.

Personal Database

Search Engines

Obstacles

Header Tag for Entry Title?

--Bryan 14:55, 14 Aug 2005 (PDT)

Many weblog CMSes allow for concurrent publishing of entries in the following ways:

  • multiple entries on a page (an "Index," monthly archive, category archive, etc. see Example)
  • one entry on a page (see Example)

Early attempts at blog-post-formats have set the title of the blog post to use the h3 tag.

At least where individual entry pages are concerned (and possible including indexes and archives), I recommend using h1 for the entry title, given that the entry is by far the most important chunk of information on the page, and it's what we'd want search engines to recognize as such. In the case where the h1 was used for the site title, fears about "losing" this information should be allayed by simply including the site name in the title tag, after the title of the article / entry / post.

Whether an h3 or h1 is used is irrelevant, the semantics will be applied with classnames. This is a non-issue. --RyanKing 22:35, 18 Aug 2005 (PDT)

See Also