UserPreferences

CommentEntryExample


TODO

Needs to be matched with Atom 0.2 http://diveintomark.org/archives/2003/08/05/atom02

Examples

Comment Example Alice

<?xml version="1.0" encoding="UTF-8"?>  
<feed xmlns="http://purl.org/echo/" version="1.0" xml:lang="en-us">
  <title>Flat feed style</title>

  <entry id="e45">
    <title>Parent entry</title>
    <content mode="xml">Yea!</content>
  </entry>

  <entry id="e48" parent="e45">
    <title>Child entry (aka comment)</title>
    <content mode="xml">No!</content>
  </entry>
  
  <entry id="e733" mode="xml" src="http://example.com/weblog/733.html"/>
  
  <entry id="e876" parent="e733">
    <title>Yet another child entry (aka comment)</title>
    <content mode="xml">I agree</content>
  </entry>
</feed>

Comment Example Bob

[ZhangYining RefactorOk] seems the Id of an entry is not yet decided(?). Here is another possible view I see of the above example.

<?xml version="1.0" encoding="UTF-8"?>  
<feed xmlns="http://purl.org/echo/" version="1.0" xml:lang="en-us">
  <title>Flat feed style</title>

  <entry>
    <title>Parent entry</title>
    <content mode="xml">Yea!</content>
    <id>http://purl.og/e45</id>
  </entry>

  <entry>
    <id>http://purl.org/e48</id>
    <related>
      <relationRole>http://purl.org/echo/comment</relationRole>
      <relationHref>http://purl.org/e45</relationHref>
      <relationAuthor> 
        <name>Bob B. Bobbington</name> 
        <homepage>http://bob.name/</homepage> 
        <weblog>http://bob.blog/</weblog> 
        <email>bob@bobbington.org</email> 
      <relationAuthor>
    </related>
    <title>Child entry (aka comment)</title>
    <content mode="xml">No!</content>
  </entry>
  
  <entry mode="xml" src="http://example.com/weblog/733.html">
     <id>http://purl.org/e733</id>
   </entry>
  
  <entry>
    <id>http://purl.org/e876</id>
    <related>
      <relationRole>http://purl.org/echo/comment"</relationRole>
      <relationHref>http://purl.org/e733"</relationRole>
      <relationAuthor> 
        <name>Bob B. Bobbington</name> 
        <homepage>http://bob.name/</homepage> 
        <weblog>http://bob.blog/</weblog> 
        <email>bob@bobbington.org</email> 
      <relationAuthor>
    </related>
    <title>Yet another child entry (aka comment)</title>
    <content mode="xml">I agree</content>
  </entry>
</feed>

Not sure about the relationRole and relationHref are in the right syntax. Please refactor as you see fit.

After writing it out, I prefer the original version, but both Id and Related are not decided yet, this is just what might come out.

Just changed it to reflect changes in Related

Comment Example Cindy

[KellanElliottMcCrea] Or an example based on the idea that a comment is one of several types of annotation. (as discussed in IsaCommentAnEntry)

<entry>
    <title>My First Entry</title>
    <summary>A very boring entry; just learning how to blog here...</summary>
    <link>http://bob.blog/28</link>
    <id>http://bob.blog/28</id>
</entry>

<entry>
    <title>A comment</title>
    <summary>Yes that was a very boring entry</summary>
    <link>http://bob.blog/comment/1</link>
    <id>http://bob.blog/comment/1</id>
    <annotate rel="comment">http://bob.blog/28</annotate>
</entry>

Or if you wanted to use the XLink style instead of the HTML link style

    <annotate role="urn:echo-comment">http://bob.blog/28</annotate>

Is the body of the annotate a id or a link? see EntryIdentifier. [NickChalko]

[AdamRice RefactorOk] Second example is awfully verbose, and some people have raised fair bandwidth concerns about format-bloat. A few points:

[JeremyGray] Since CommentsAreEntries, whether expressed as entry/@parent or as entry/annotate (of either the 'HTML' or 'XLink' varieties mentioned earlier), one really only need provide examples for and generate discussion of the specifics of the back-pointer. Posting the rest of the surrounding entry isn't really necessary, and specifically choosing to not post the rest of the surrounding entry would provide a constant re-affirmation that a comment is an entry and keep us from slipping towards things like the <relationAuthor> shown in an earlier example.

[Manuzhai] I like the <annotate> a lot, but maybe a type attribute should be added? It could be "child", "parent" (depending on the point of view, I thinks one of them would suffice), or "related", or something. Like this: (switching the attributes' names seems more logical to me).

Comment Example David

<entry>
    <title>My First Entry</title>
    <summary>A very boring entry; just learning how to blog here...</summary>
    <link>http://bob.blog/28</link>
    <id>http://bob.blog/28</id>
</entry>

<entry>
    <title>A comment</title>
    <summary>Yes that was a very boring entry</summary>
    <link>http://bob.blog/comment/1</link>
    <id>http://bob.blog/comment/1</id>
    <annotate type="comment" rel="parent">http://bob.blog/28</annotate>
</entry>

See Also


CategoryModel, CategorySyntax