From Microformats Wiki
comment-brainstorming /
Jump to navigation Jump to search

Brainstorming for a Comment Microformat

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


Shortform: How do you track blog comments you've made?

Longform: 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?


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)

  • comment 100%
  • author 96%
  • published 96%
  • author-url 84%

Other achievable elements

  • comment-link (permalink) 60%

Schema I


  • url (author-url) 84%
  • reply (comment-link) 60%
    • By adding "rel-reply" the author is indicating that the page http://someblog/post#comment-001 is a reply for the referring page (see example).
      1. reply MAY be defined as rfc4685 section 3 (1) in-reply-to atom threading extension.
      2. A parser MAY use the referring page http://someblog/post as the value of in-reply-to (see transformation)


<div class="hentry" id="comment-001">
   <span class="author vcard">
       <span class="entry-title"><a class="url fn" href="">Author</a> said</span>
   about <span class="updated" title="2008-09-01T14:40:45+01:00">72 days ago</span>, 
   <div class="entry-content">
      <p>Hey Great Post</p>
   <a rel="reply bookmark" href="http://someblog/post#comment-001">link to this</a>


     <title>Author said</title>
     <link rel="alternate" href="http://someblog/post#comment-001" type="text/html"/>
     <content>Hey Great Post</content>

Parser Notes

  • If the entry-title element is not used, the atom:title element SHOULD use the author value of the hentry presented in a contextual way, for example by prefixing the author value with "by" or appending it with "said" or "says".
  • The entry-title element SHOULD provide textual content and not be an empty string.



Design Notes

Schema II


  • reuse hAtom 0.1
  • if Entry "B" is in an Entry Comments element of Entry "A", then Entry "B" is a comment on Entry "A"
  • an Entry Comments element is identified by using both class names "hfeed comments"
<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)

  • If an hfeed is embedded in an hEntry, that could be enough context to show "these items are replies to the one they're embedded in" singpolyma 12:20, 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 [1], [2], [3].

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.

  • "examples covered" indicates the percentage of examples that can be marked up without presentation changes
  • Add your comments, objections and votes (-1, 0, +1) as a sublist in "comments" with your wikiname.

use hAtom Entry for a comment

  • notes:
  • test cases covered: 95%
    • the blogger comments marked as a definition list is problematic, as there is no object that wraps an entire comment
  • comments and votes:

mark the comment permalink with rel="reply"

  • notes:
    • By adding "rel-reply" the author is indicating that the resource indicated by the href is a "reply" to the current document.
  • test cases covered:
    • 60%
  • comments and votes:
    • +1 Martin McEvoy
    • -0.5 David Janes I have several objections: this seems to be a proper subset of what could be covered by marking a comment hEntry with class="comment", and it seems to being opening up a general "reply/threading" microformat that should be completely and independently analyzed. I have doubt too about how well this will work if the document that's being replied to is specified with hashed URL.

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

  • notes:
  • test cases covered:
  • comments and votes:
    • Who proposed this? Sounds like an an abuse of the meaning of rel. -1 from me. TobyInk

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

  • notes:
  • test cases covered:
  • comments and votes:
    • As long as it's optional (i.e. not the only way to mark that an hentry is a reply to something), my vote is +1. TobyInk
    • David Janes -1. This seems be inventing something that for the most part is already covered, i.e. is entirely an orthogonal solution. I do not deny this could be of great utility as part of a general threading microformat, but that would have to be independently analyzed.

add class="comment" to the comment Entry

  • notes:
    • All the examples studied were the concept of a comment
  • test cases covered:
    • 95% (note the usual DL/DT issues in some Blogger templates)
  • comments and votes:
    • +1 Martin McEvoy
    • 0 David Janes although it covers 100% of the examples, hAtom does have the concept of a cluster of related Entries, and thus I feel it would be better modeled that way.

add hAtom Entry Feed around all comments

  • notes:
  • test cases covered:
  • comments and votes:

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

  • notes:
  • test cases covered: 10)%
  • comments and votes:
    • +1, but would prefer class="replies" because of analogy with Atom. Better to reuse an existing vocabulary than pull terms out of a hat. TobyInk
    • +1 David Janes. I'm thinking of this as Entry Replies, which would be physically represented as whatever. Using Entry Replies around all comments would reflect the fact that in 100% of the examples comments come in bunches.

use XOXO to mark up comments

  • notes:
  • test cases covered:
  • comments and votes:

Twitter is a comments system

  • notes:
  • comments and votes:

A comment microformat should deal with hierarchically nested comments

  • notes:
  • comments and votes:
    • assuming that there is some kind of explicit, programmably-discoverable link between the comments and the thing being commented on (be it through nesting, an anchor link or some other method), then it is almost unavoidable that a comment microformat would be able to deal with hierarchical comments. After all, a hierarchical set of comments is merely a set of comments such that some of the comments are comments commenting on other comments. (I wonder if I could have avoided using the word "comment" six times in that previous sentence?) TobyInk
    • +1 Yes As all comments that I have looked at DO have a hierarchical structure, some nested inside each other as replies to other comments. I believe in "most" cases XOXO 1.0: Extensible Open XHTML Outlines (<ol> and <ul>) can address the problems of structure and hierarchy, this SHOULD however be totally optional, or maybe just a design note Martin McEvoy

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

  • comments and votes:
    • +1 Use the author value of the hentry presented in a contextual way, for example by prefixing the author value with "by" or appending it with "said" or "says" Martin McEvoy

suggested usage template for above

  • notes
    • bla bla bla
  • test cases covered:
    • 50%
  • comments and votes:
    • +1 this is a great idea - SomeUser
    • -1 this doesn't even work in have the cases - SomebodyElse
      • you don't even know how to spell "half" - SomeUser

See Also