Brainstorming for a Comment Microformat

Jump to: navigation, search

See instead: and

This is a brainstorm for comment microformat. Examples of a comment can be found here comment-examples



Shortform: How do you publish comments on your own site, and how do you publish comments others have made on your posts?

Longform: How do you publish your own comments, others' comments on your stuff, and how do you track comments? How do track the comments you have made on blogs, comments made on blogs your interested in and comments other people have made on your own blog?

How can you do this in a pragmatic way, ingested into some kind of data store, searched or aggregated?

Distinction between Comment and List of Comments

Ideally, each comment/reply should have its own permalink page, but also get copied into the markup of the post its in reply to. Should the markup of the two cases differ? We should be able to solve both problems by extending h-entry a little.

Discovered Elements

Based on the analysis of 25 real world examples of a comment, the results can be found at the Comment Analysis section

The following properties occur most regularly across all examples (84% or more)

Other achievable elements

microformats2 p-comment h-entry

For publishing others' comments on your posts, including syndicating in others' comment posts onto your posts:


How to:


<div class="h-entry">
  <h1 class="p-name">A Blog Post</h1>
  <div class="p-comment h-entry" id="comment-1"><a href="" class="u-in-reply-to"></a>
    <a class="p-author h-card" href=...><img alt=author1 src=...></a> 
    <span class="p-name p-content">The First Comment</span>
    (<a class="u-url dt-published" href="#comment-1">YYYY-DD-MM HH:MM</a>)
  <div class="p-comment h-entry" id="comment-2"><a href="" class="u-in-reply-to"></a>
    <a class="p-author h-card" href=...><img alt=author2 src=...></a> 
    <span class="p-name p-content">The Second Comment</span>
    (<a class="u-url dt-published" href="#comment-2">YYYY-DD-MM HH:MM</a>)


Use case for same page u-in-reply-to

Q: What is the use-case for the same page u-in-reply-to?

A: The use-case for the same page u-in-reply-to is applications/sites that may subscribe to the comments as a feed, perhaps mix them in with other comments/entries. Having an explicit u-in-reply-to makes the comment portable. It's not critical, but it is also a simple/good pattern that encourages extracted data to be self-contained in general.


Note simplifications from microformats2 h-feed p-comments proposal:

microformats2 h-feed p-comments

For publishing others' comments on your posts:


<div class="h-entry">
  <h1 class="p-name">A Blog Post</h1>
  <div class="h-feed p-comments">
    <div class="h-entry" id="comment-1">
      <h2 class="p-name">The First Comment</h2>
    <div class="h-entry" id="comment-2">
      <h2 class="p-name">The Second Comment</h2>

older pre-microformats2 proposals

Schema I



<div class="comment hentry" id="comment-7">
	<p><span class="entry-title">
      <cite class="author vcard">
        <a class="url fn" href="" rel="contact external" title="Link to Matthias Pfefferle">Matthias Pfefferle</a>
      </cite> said
    <span class="comment-date">about: 
        <abbr class="updated" title="2008-09-02T01:20:32+01:00">85 days ago</abbr>
	<div class="entry-content">
      <q cite="">Awesome! It works perfect for me. 
      Do you know if its possible to use the firefox microformats api with ubiquity? 
      And by the way... nice webslices implementation on your blog.</q>
  <p><a rel="bookmark" href="" title="Permalink to this comment">Permalink</a></p>


    <title>Matthias Pfefferle said</title>
    <link rel="alternate" href="" 
          title="Permalink to this comment" type="text/html"/>
    <content type="xhtml">
      <div xmlns="">
        <q cite="">
        Awesome! It works perfect for me. 
        Do you know if its possible to use the firefox microformats api with ubiquity? 
        And by the way... nice webslices implementation on your blog.</q>
      <name>Matthias Pfefferle</name>

Working Examples

Parser Notes



Design Notes

Schema II


<div class="hentry">
   <h3 class="entry-title">The blog post title</h3>
   <div class="entry-content">The blog post text</div>
   <div class="hfeed comments">
       <div class="hentry" id="p0001">
          <div class="entry-content">Comment #1</div>
       <div class="hentry" id="p0002">
          <div class="entry-content">Comment #2</div>


Specific Example from the Wild

hAtom Comments changes are marked IN UPPER CASE LETTERS FOR VISIBILITY. Assume them to be the normal case in otherwise

(section to be completed)


If we can indicate that the hAtom entries are also comments, we could add an indicator beside hAtom.

<div class="hfeed hcomment">

hAtom pattern goes here.


Alternatively, we could add hcomment with hentry to indicate that the following hentry can be treated also as a comment.

<div class="hentry hcomment">

hEntry pattern goes here.


--Sarven Capadisli 11:59, 25 Sep 2008 (PDT)

hAtom and in-reply-to

A user comment (e.g., in blogs, wikis, forms) can be marked as an hAtom since it has a similar content pattern. A way to differentiate an hEntry (e.g., a blog post) from another hEntry (e.g., a user comment) can be done reusing in-reply-to from Atom Threading Extensions. It provides a mechanism to indicate that an entry is a response to another resource. rel="in-reply-to" can indicate that the current hEntry is a reply to another hEntry and has a reference point @href:

<a rel="in-reply-to" href="#comment_20080902144745">Parent</a>

hEntries that use rel="in-reply-to" can be considered as a comment entry in response to a parent entry in the threaded conversation (e.g., in blogs, wikis, forms).

hEntries that are chronologically listed can all use rel="in-reply-to" and refer to the root hEntry (e.g., blog post, form post)

By reusing in-reply-to, we can solve the microformats representation for user comments [2], [3], [4].

Example comment using in-reply-to:

--Sarven Capadisli 21:25, 3 Oct 2008 (PDT)

Idea Consolidation

This is a list of all the various "micro-ideas" that have been discussed on the mailing list in the Wiki, to capture everyone's thoughts and preferences.

use hAtom Entry for a comment

mark the comment permalink with rel="reply"

mark the comment permalink with rel="in-reply-to"

add an independent rel="in-reply-to" link

add class="comment" to the comment Entry

add hAtom Entry Feed around all comments

add class="comments" (or similar) to a element around all comments

use XOXO to mark up comments

Twitter is a comments system

A comment microformat should deal with hierarchically nested comments

if hAtom Entry is used, the Entry Title if not present should be X

suggested usage template for above

See Also


Brainstorming for a Comment Microformat was last modified: Friday, June 8th, 2018