Difference between revisions of "comment-brainstorming"

From Microformats Wiki
comment-brainstorming
Jump to navigation Jump to search
Line 29: Line 29:
 
Proposal:
 
Proposal:
  
* '''contributor''' (author)100%
+
* '''author''' (author)100%
**  "atom:contributor" a person or other entity who contributed to the entry or feed.
+
**  an Entry Author element {{must}} be encoded in an hCard
**# http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.contributor
+
**# http://microformats.org/wiki/hatom#Entry_Author
**# Contents are either text or a valid [[hcard]]
+
**# an Entry Author element {{should}} be encoded in an <code><address></code> element
  
 
* '''url''' (author-url) 92%
 
* '''url''' (author-url) 92%
Line 42: Line 42:
 
    
 
    
 
* '''updated''' (date) 100%
 
* '''updated''' (date) 100%
** The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
+
** use the [[datetime-design-pattern]] to encode the updated datetime
**# http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.2.15
+
**# http://microformats.org/wiki/hatom#Entry_Updated
  
* '''related''' (comment-link) 40%  
+
* '''bookmark''' (comment-link) 40%  
** related: A document related to the entry or feed.
+
** bookmark: an Entry Permalink element is identified by [[rel-bookmark]].
**# http://www.atomenabled.org/developers/syndication/index.php#link
+
**# http://microformats.org/wiki/hatom#Entry_Permalink
  
* '''item''' (a container element for a comment)
+
* '''hentry''' (a container element for a comment)
  
  
Line 55: Line 55:
  
 
<pre>
 
<pre>
<div class="item" id="comment-001">
+
<div class="hentry" id="comment-001">
  <span class="contributor vcard">
+
  <address class="author vcard">
    <a class="url fn" href="http://contributor.com/blog/">Contributor</span> said on
+
      <span class="entry-title"><a class="url fn" href="http://contributor.com/blog/">Author</a> said</span>
  </span>
+
  </address>
  <abbr class="updated" title="2008-01-01T00:00:00+00:00">1st, Jan 2008</abbr>.
+
  about <abbr class="updated" title="2008-09-01T14:40:45+01:00">72 days ago</abbr>,
  <span class="entry-content">Happy New Year</span>
+
  <div class="entry-content">
  <a rel="related" href="#comment-001">link to this</a>.
+
      <p>Hey Great Post</p>
 +
    </div>
 +
  <a rel="bookmark" href="#comment-001">link to this</a>
 
</div>
 
</div>
 
</pre>
 
</pre>

Revision as of 14:19, 13 November 2008

Brainstorming for a Comment Microformat

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

Contributors


Discovered Elements

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

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

  • author (name)100%
  • comment (text) 100%
  • published (date) 100%
  • author-url (href) 92%

Other achievable elements

  • comment-link (a permalink) 40%

Schema

Proposal:

  • url (author-url) 92%
  • hentry (a container element for a comment)


Example:

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

Feedback

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.

</div>

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.

</div>

--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 Route

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].

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