comment-brainstorming: Difference between revisions
WebOrganics (talk | contribs) |
DavidJanes (talk | contribs) |
||
Line 123: | Line 123: | ||
* reuse [[hAtom]] | * reuse [[hAtom]] | ||
* | * 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" | |||
* | |||
<pre> | <pre> |
Revision as of 13:13, 16 November 2008
Brainstorming for a Comment Microformat
This is a brainstorm for comment microformat. Examples of a comment can be found here comment-examples
Problem
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?
Contributors
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 (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 I
Proposal
- hentry (root class name)
- The
hentry
element represents an individual entry for a comment.
- The
- author (author)100%
- an Entry Author element MUST be encoded in a hCard
- url (author-url) 92%
- Use the url value of a hcard
- entry-content (comment) 100%
- The "logical Entry Content" of an Entry is the concatenation, in order of appearance, of all the Entry Contents within the Entry
- updated (date) 100%
- use the datetime-design-pattern to encode the updated datetime
- reply (comment-link) 40%
- The "reply" element is used to indicate that an entry is a response to another resource.
- http://tools.ietf.org/html/rfc4685#section-3
reply
SHOULD be defined as rfc4685 section 3 (1) in-reply-to atom threading extension.- The href value of
reply
MAY contain a dereferenceable URI using a slash uri scheme.
- The "reply" element is used to indicate that an entry is a response to another resource.
Example
<div class="hentry" id="comment-001"> <span class="author vcard"> <span class="entry-title"><a class="url fn" href="http://contributor.com/blog/">Author</a> said</span> </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> </div> <a rel="reply bookmark" href="http://someblog/post#comment-001">link to this</a> </div>
Transformation
<entry> <id>http://someblog/post#comment-001</id> <title>Author said</title> <updated>2008-09-01T14:40:45+01:00</updated> <author> <name>Author</name> <uri>http://contributor.com/blog/</uri> </author> <link rel="alternate" href="http://someblog/post#comment-001" type="text/html"/> <thr:in-reply-to ref="http://someblog/post" type="text/html" href="http://someblog/post"/> <content>Hey Great Post</content> </entry>
Parser Notes
- If the
entry-title
element is not used, the atom:title element SHOULD use theauthor
value of thehentry
presented in a contextual way, for example by prefixing theauthor
value with "by" or appending it with "said" or "says". - The
entry-title
element SHOULD provide textual content and not be an empty string.
Summary
- This proposal means that on the whole nothing much is needed for a comment microformat, a comment can re-use terms outlined in the hAtom Microformat, but instead of using just rel-bookmark use rel-reply as well to indicate that the hEntry is also a reply.
- The rel-reply link type may be better expressed in this case as a
rev="reply"
link indicates that the current hEntry is a "reply" for the resource indicated by the href, unfortunatelyrev
has been grandfathered because there are questions about " should rev even be used".
References
- Comment Formats
- hAtom Microformat
- Atom Threading Extensions rfc4685
Design Notes
- Linked Data (Tim Berners-Lee 2006)
- Dereferenceable Uniform Resource Identifier (Wikipedia)
Schema II
Proposal
- reuse hAtom
- 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> (etc) <div class="hfeed comments"> <div class="hentry" id="p0001"> <div class="entry-content">Comment #1</div> (etc) </div> <div class="hentry" id="p0002"> <div class="entry-content">Comment #2</div> (etc) </div> </div> </div>
Details
- if there is no Entry Title for a comment, it can be assumed to be empty or the blog post title (investigate current atom feeds)
- this was discussed at SGFooCamp, see: http://www.flickr.com/photos/90594399@N00/2271787498/
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 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: http://www.csarven.ca/my-responses-are-in-white
--Sarven Capadisli 21:25, 3 Oct 2008 (PDT)
See Also
Related: