<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY rfc2119 PUBLIC '' 
      'reference.RFC.2119.xml'>
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xml' ?>   

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc private="yes" ?>
<!-- 
   1. Update the docName
   2. Update the date
   3. Update the Revision History.
-->
<!-- To Do
 x 1. change <delete> to DELETE
 x 2. Update RSD to 1.0 "location" att name to "apiLink" or drop 
 x 3. Put all documents in a namespace
 x 4. Do aarons search interface.
   5. Add in all the right headers for at least the first two examples, Host, Content-Length, etc.
 x 6. Change POST to PUT for updating Entries?
 x 7. change to x.atom+xml
   8. Add in 'categories' to Introspection.
   9. HTTP status code is used to indicate method call success or failure, I would
      like to see more error information structured in XML and packed into HTTP Response
      body, that will allow implementation to provide detailed and probably tracable error
      messages and allows client side software make informed error handling decision;
x 10. Change copyright.
x 11. Remove RSD
x 12. Add Kens copy (went with the wiki markup)

  13. Add atom-recent
  14. Clarify that atom-start-range starts from the most recent post
  15. Add performance/http compliance section that says:
      1. use ETags/Last-Modified on GETs
      2. use gzip
      3. note that dispatching on VERB and mime-type are web server functions
      4. 
  16. Add a glossary, then use the terms consistently.
  17. Change PUT response 205 to 200.
-->
<rfc category="std" ipr="none" docName="draft-gregorio-07.html">
    <front>
        <title>The AtomAPI</title>
        <author initials='J.C.' surname="Gregorio" fullname='Joe Gregorio'>
            <organization>BitWorking, Inc</organization>
	        <address>
		<postal>
		    <street>1002 Heathwood Dairy Rd.</street>
		    <city>Apex</city> <region>NC</region> <code>27502</code>
		    <country>US</country>
		</postal>
		<phone>+1 919 272 3764</phone>
		<email>joe@bitworking.com</email>
		<uri>http://bitworking.com/</uri>
                </address>
        </author>
        <date day="22" month="July" year="2003"/>
        <abstract><t>This memo presents a technique for 
	  using XML (Extensible Markup Language) and HTTP (HyperText Transport Protocol)
	  to edit content. </t>

	  <t>To provide feedback on this draft RFC 
	    please visit the <eref target="http://www.intertwingly.net/wiki/pie/RestEchoApiDiscuss">Atom Wiki</eref>.
	    </t>
	</abstract>
    </front>

    <middle>

        <section title="Introduction">
           <t>AtomAPI is an application level protocol for publishing, and editing web resources. 
              AtomAPI unifies many disparate publishing mechanisms into a single, simple, 
              extensible protocol. The protocol at its core is the HTTP transport of an XML payload. 
           </t>

	  <t>To provide feedback on this draft RFC 
	    please visit the <eref target="http://www.intertwingly.net/wiki/pie/RestEchoApiDiscuss">Atom Wiki</eref>.
	    </t>
       </section>

       <section title="Terminology">
            <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
            "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",the 
            and "OPTIONAL" in this document are to be interpreted as
            described in RFC2119.</t>
       </section>

       <section title="Scope">
            <t>This document covers the editing of content of a periodically updating website using the 
               HTTP and XML. Many of the XML payloads are in Atom format, which will not be documented here.
            </t>
            <t>This specification will mirror some of the functionality of the <eref target="http://www.blogger.com/developers/api/documentation20.html">Blogger 2.0 API</eref>, which
               includes support for the <eref target="http://scripts.incutio.com/xmlrpc/introspection.html">Server Introspection API</eref>.
            </t>
       </section>

       <section title="The AtomAPI Model">
            <t>AtomAPI is an application level protocol for publishing 
	     and editing web resources. Using the common HTTP verbs provides a pattern 
	     for working with all such web resources:</t>
	    <list style="symbols">
	      <t>GET is used to retrieve a resource or perform a read-only query.</t>
	      <t>PUT is used to update a known resource.</t>
	      <t>POST is used to create a new dynamically-named resource, or perform an update action.</t>
	      <t>DELETE is used to remove a resource.</t>
            </list>

	    <t>There are different kinds of resources managed by the AtomAPI, each of these 
	      have URIs and those URIs support a subset of the above actions.</t>
	      <list>
	        <t>Entries: POST, PUT, GET, DELETE</t>
		<t>Comments: POST, (optionally PUT, GET and DELETE)</t>
		<t>Preferences: PUT, GET</t>
		<t>Templates: PUT, GET</t>
              </list>
           <t>This RFC does not specify the form of the URIs that are used. The URI space
	      of each server is controlled, as defined by HTTP, by the server alone. What
	      this RFC does specify are the formats of the files that are exchanged
	      and the actions that can be performed on the URIs embedded in those files.
	   </t>
       </section>

       <section title="The AtomAPI Procedure">
          <section title="Introspection">
            <t>When editing the content of the website http://example.org/reilly, the first thing to do is find out the 
               servers capabilites. Each server may only implement a subset of this specification, and the 'introspection' file
               lists all the functions that each site supports. This mirrors the <eref target="http://scripts.incutio.com/xmlrpc/introspection.html">Server Introspection API</eref>
               used by the Blogger 2.0 API. 
            </t>

            <figure>
                 <artwork><![CDATA[
<?xml version="1.0" encoding='iso-8859-1'?>
<introspection xmlns="http://example.com/newformat#" > 
  <create-entry>http://example.org/reilly/</create-entry>
  <user-prefs>http://example.org/reilly/prefs</user-prefs>
  <search-entries>http://example.org/reilly/search</search-entries>
</introspection>  ]]></artwork>
            </figure>

            <figure>
                 <preamble>Each element in &lt;introspection> represents
                   a single facet of the AtomAPI. While a site must fully support
                   each facet they list in their introspection file, a site does
                   not need to support all the facets in this RFC. Additionally,
                   new facets may be added either through vendor extension or
                   follow-on RFCs. This first example site furnishes only a
                   minimal set of functionality. A more full featured site
                   might return:</preamble>
                 <artwork><![CDATA[
<?xml version="1.0" encoding='iso-8859-1'?>
<introspection xmlns="http://example.com/newformat#" > 
  <create-entry>http://example.org/reilly/</create-entry>
  <user-prefs>http://example.org/reilly/prefs</user-prefs>
  <search-entries>http://example.org/reilly/search</search-entries>
  <edit-template>http://example.org/reilly/templates</edit-template>
  <categories>http://example.org/reilly/categories</categories>
</introspection>                  ]]></artwork>
            </figure>

             <t>This particular introspection file for http://example.org/reilly tells us 
	        that the AtomAPI implementation supports both the 'create-entry' and the 'user-prefs'
                interfaces, and it also specifies the URIs to use for each of these interfaces. </t>
	     <t>Note that the example URIs given are not normative, nor are
                there any constraints on the 
                URIs that can be specified. The 'create-entry' URI could just have easily been: </t>
             <figure>
                 <artwork><![CDATA[
http://dev.example.net/api?userid=reilly&action=create]]></artwork>
             </figure>

               <section title="Introspection Discovery">
                   <t>The &lt;link> element has been successful in finding RSS feeds and is appropriate to 
		     use here for discovering the location of the Introspection file. The <eref target="http://www.w3.org/TR/html401/struct/links.html#edef-LINK">&lt;link></eref> tag goes in the &lt;head> section 
		     of an HTML page and is used to indicate a document relationship. For a similar example of using the link tag 
		     to discover a URI, refer to the usage of 
		     of the link tag for <eref target="http://diveintomark.org/archives/2002/05/30/rss_autodiscovery.html">RSS Auto-Discovery</eref>.
		     In this case the form of the link tag used to indicate the location of the comment URI is:</t>

                   <figure>
                       <artwork><![CDATA[
<link rel="service.edit" type="application/x.atom+xml" 
      href="url goes here" title="AtomAPI">]]></artwork>
                   </figure>

                   <t>Where href should be set to the URI of the Introspection file. 
		     Applications looking for the Introspection file
		     to  need to parse out the 
		     headers of the web page and look for a link tag that has a 
		     relation rel of "service.edit" and a mime-type of "application/x.atom+xml".
		     </t>
   	       </section>
	     </section>
	   
             <section title="Creating a new Entry request" anchor="Model_Create">
               <t>HTTP POST is used for content creation. The new content is 
		 formatted as an Atom Entry and then POSTed to the URI given in the 
		 &lt;create-entry/> element of the Introspection file. </t>
               <figure>
                 <preamble>To create a new Entry on the site the client connects to port 80 
	           on http://example.org and sends:</preamble>
                 <artwork><![CDATA[
POST /reilly HTTP/1.1
Content-Type: application/x.atom+xml

<?xml version="1.0" encoding='iso-8859-1'?>
<entry xmlns="http://example.com/newformat#" >  
    <title>My First Entry</title> 
    <summary>A very boring entry...</summary> 
 
    <author> 
      <name>Bob B. Bobbington</name> 
    </author> 

    <created>2003-02-05T12:29:29</created> 
 
    <content type="application/xhtml+xml" xml:lang="en-us"> 
      <p xmlns="...">Hello, <em>weblog</em> world! 2 &lt; 4!</p> 
    </content>  
</entry> ]]></artwork>
                 <postamble>This would create a new weblog Entry 
		   with the title "My First Entry". Note that in all the examples
		   the full set of HTTP headers for each request and response are not shown, only the most
		   relevant headers are displayed.</postamble>
               </figure>
	       
	       <figure>
                 <preamble>Assuming everything goes well and the Entry is created
		   the response might look like:</preamble>
                 <artwork><![CDATA[HTTP/1.1 201 Created
Location: http://example.org/reilly/1]]></artwork>
               </figure>

               <t>The URI of the filled in Entry is returned via the HTTP headers. The AtomAPI service
	           is responsible for allocating the URI for the Entry. The URI allocation 
		   mechanism is implementation dependent and not defined by this document.
		   If a GET is done on the returned URI then a filled in Entry would be returned, including the 
                   elements &lt;link/>, &lt;id/>, &lt;created/> and &lt;modified/>.</t>

	       <section title="Retrieving an Entry" anchor="Model_Get">
	       <t>To retrieve the new Entry on the site the client 
	         needs to know the URI of the Atom Entry. This URI is obtained either
		 by the HTTP Location header returned during the creation of the Entry
		 as outlined in <xref target="Model_Create"/>, 
		 or it is discovered by the search interface discussed in <xref target="Model_Find"/>.
		 </t>
               <figure>
               <preamble>For the newly created
		 Atom Entry above, the client connects 
	         to port 80 on http://example.org and sends:</preamble>
                 <artwork><![CDATA[GET /reilly/1 HTTP/1.1
Accept: application/x.atom+xml ]]></artwork>
                 <postamble>This would retrieve the Entry just created. </postamble>
             </figure>

	     <figure>
               <preamble>The response might look like:</preamble>
                 <artwork><![CDATA[
HTTP/1.1 200 Ok
Content-Type: application/x.atom+xml

<?xml version="1.0" encoding='iso-8859-1'?>
<entry xmlns="http://example.com/newformat#" >  
    <title>My First Entry</title> 
    <summary>A very boring entry...</summary> 
 
    <author> 
      <name>Bob B. Bobbington</name> 
    </author> 

    <issued>2003-02-05T12:29:29</issued> 
    <created>2003-02-05T14:10:58Z</created> 
    <modified>2003-02-05T14:10:58Z</modified> 
    
    <link>http://example.org/reilly/2003/02/05#My_First_Entry</link>
    <id>urn:example.org:reilly:1</id>
 
    <content type="application/xhtml+xml" xml:lang="en-us"> 
      <p xmlns="...">Hello, <em>weblog</em> world! 2 &lt; 4!</p> 
    </content>  
</entry> ]]></artwork>
                 <postamble>Information has been added to the Entry, including the &lt;link/>, &lt;id/>, &lt;created/> and &lt;modified/> elements.</postamble>
             </figure>

             <t>@@ Editors Note: Beware the Atom syntax is still in flux and the above example is not normative. @@</t>
            </section>
           </section><!-- Creating a new Entry  -->

           <section title="Editing an entry">
	     <t>Editing an Entry is different from creating one, the difference is that the Entry is PUT back to the 
	     URI that you retrieved it from via GET. 
             </t>

	     <figure>
               <preamble>If the &lt;content/> element is updated 
	         the transaction might look like:</preamble>
                 <artwork><![CDATA[
PUT /reilly/1 HTTP/1.1
Content-Type: application/x.atom+xml

<?xml version="1.0" encoding='iso-8859-1'?>
<entry xmlns="http://example.com/newformat#" >  
    <title>My First Entry</title> 
    <summary>A very boring entry...</summary> 
 
    <author> 
      <name>Bob B. Bobbington</name> 
    </author> 

    <issued>2003-02-05T12:29:29</issued> 
    <created>2003-02-05T14:10:58Z</created> 
    <modified>2003-02-05T14:10:58Z</modified> 
    
    <link>http://example.org/reilly/2003/02/05#My_First_Entry</link>
    <id>urn:example.org:reilly:1</id>
 
    <content type="application/xhtml+xml" xml:lang="en-us"> 
      <p xmlns="...">A big hello to the 
         <em>weblog</em> world! 2 &lt; 4!</p> 
    </content>  
</entry> ]]></artwork>
             </figure>

	     <figure>
               <preamble>The response from the server, on success, returns a 205 HTTP status code.</preamble>
                 <artwork><![CDATA[HTTP/1.1 205 Reset Content
]]></artwork>
                 <postamble>The &lt;content/> element now reflects the updated content, and the &lt;modifed/> element has
		    been updated to reflect when the change was made.</postamble>
             </figure>

             <t>As was done after creation, a GET to the URI of the 
	       Atom Entry would return the modified Entry.</t>
 
               <figure>
               <preamble>To retrieve the modified Entry 
	         the client connects to port 80 on http://example.org and sends:</preamble>
                 <artwork><![CDATA[GET /reilly/1 HTTP/1.1
Content-Type: application/x.atom+xml ]]></artwork>
                 <postamble>This would retrieve the recently modified Entry. </postamble>
             </figure>

	     <figure>
               <preamble>The response might look like:</preamble>
                 <artwork><![CDATA[
HTTP/1.1 200 Ok
Content-Type: application/x.atom+xml

<?xml version="1.0" encoding='iso-8859-1'?>
<entry xmlns="http://example.com/newformat#" >  
    <title>My First Entry</title> 
    <summary>A very boring entry...</summary> 
 
    <author> 
      <name>Bob B. Bobbington</name> 
    </author> 

    <issued>2003-02-05T12:29:29</issued> 
    <created>2003-02-05T14:10:58Z</created> 
    <modified>2003-02-05T14:22:03Z</modified> 
    
    <link>http://example.org/reilly/2003/02/05#My_First_Entry</link>
    <id>urn:example.org:reilly:1</id>
 
    <content type="application/xhtml+xml" xml:lang="en-us"> 
      <p xmlns="...">A big hello to the 
         <em>weblog</em> world! 2 &lt; 4!</p> 
    </content>  
</entry> ]]></artwork>
                 <postamble>The &lt;content/> element now reflects the 
		   updated content, and the &lt;modifed/> element has 
		   been updated to reflect when the change was made.</postamble>
             </figure>
           </section>

           <section title="Deleting an entry">
             <t>Deleting an Entry uses the URI of the Atom Entry. This is the 
	       same URI the client does a GET on to retrieve the Atom Entry.</t>

	     <figure>
               <preamble>For example, to delete the 
	         first Entry in our example the client connects to port 80 on the server
                 and sends:</preamble>
                 <artwork><![CDATA[
DELETE /reilly/1 HTTP/1.1
 ]]></artwork>
             </figure>
 
	     <figure>
               <preamble>The response from the server upon a successful deletion is:</preamble>
                 <artwork><![CDATA[
HTTP/1.1 200 Ok ]]></artwork>
             </figure>
           </section>


           <section title="Finding an entry" anchor="Model_Find">
             <t>Finding an Entry uses the 'search-entries' URI from the Introspection file. For
	       the example Introspection file given, that is the URI http://example.org/reilly/search.
	       The search parameters given are used to select which Entries are listed
	       in the response.</t>
	     <figure>
               <preamble>For example, to retrieve the locations of the last
	         20 Entries,  the client 
	         connects to port 80 on the server and sends:</preamble>
                 <artwork><![CDATA[
GET /reilly/search?atom-last=20 HTTP/1.1
Accept: application/x.atom+xml
]]></artwork>
                 <postamble>The server searches for
		   Entries that match the criteria and returns a 
		   response that lists those matches.</postamble>
             </figure>
 
	     <figure>
               <preamble>The response from the server might look like:</preamble>
                 <artwork><![CDATA[
HTTP/1.1 200 Ok 
Content-Type: application/x.atom+xml

<search-results xmlns="http://example.com/newformat#" > 
  <entry>
    <title>My First Post</title>
    <id>http://example.org/reilly/1</id>
  </entry>
  <entry>
    <title>My Second Post</title>
    <id>http://example.org/reilly/2</id>
  </entry>
</search-results>]]></artwork>
             </figure>
	     <t>There will be one &lt;entry/> element for every Entry that 
	       matches the given criteria. Each &lt;entry/> element
	       contains the URI of the Entry and the title of the Entry. If the
	       client needs the Atom Entry then it performs an
	       HTTP GET on the given URI as outlined in <xref target="Model_Get"/>.</t>
             <t>Note that all of the query parameters begin with 'atom-' to avoid 
                conflicts with other query parameters that may already be present in the URI.</t>
	     <t>There are other search critera that can be added.
	       For example the 'atom-all' parameter, if present, requests
	       that the server return a list of all Entries on
	       the site. Other additional parameters that can be added are
	       'atom-start-range' and 'atom-end-range'. Access to the entries
	       is by an index, with the first Entry having an index number
	       of 0.</t>

	     <figure>
               <preamble>For example, this request will return a 
	         list of all Entries from index 2 to index 27.</preamble>
                 <artwork><![CDATA[
GET /reilly/search?start-range=2&end-range=27 HTTP/1.1
]]></artwork>
             </figure>
	     <t>The rest of the search parameters and their properties
	       are covered in detail in <xref target="Func_Formats"/>.
	       </t>
              <t>Note that the URI the client receives for the search facet may already have query parameters in it
	      so the client may not just append the query parameters to the end of the search URI.
	      The best approach to handling this situation 
	      is to parse out all the query parameters, add in the ones being used by the client then
	      join the URI back together.</t>
           </section>


           <section title="Editing User Prefs">
             <t>The preferences for the user are edited through 
	       the URI supplied in the &lt;user-prefs/> element of 
	       the introspection file. To retrieve the current user 
	       preferences issue and HTTP GET on the URI.</t>

             <figure>
               <preamble>For the website at http://example.org/reilly, 
	         the request would look like: </preamble>
                 <artwork><![CDATA[
GET /reilly/prefs HTTP/1.1
Accept: application/x.atom+xml ]]></artwork>
                 <postamble>This would return a list of user 
		   configuration parameters and their values.</postamble>
             </figure>

             <figure>
               <preamble>The reponse would look like: </preamble>
                 <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/x.atom+xml
 
<?xml version="1.0" encoding='iso-8859-1'?>
<userprefs xmlns="http://example.com/newformat#" > 
   <name>Reilly</name>
   <id>1234</id>
   <email>reilly@example.org</email>
</userprefs>       ]]></artwork>
                 <postamble>The values can then be updated, and doing an 
		   HTTP PUT of the updated file back to the 'user-prefs' URI
		   will update the user preferences.</postamble>
             </figure>


             <figure>
               <preamble>For example, if we update our email address, 
	         from reilly@example.org to sputnik@example.org, 
                 we would then PUT it back to the 'user-prefs' URI: </preamble>
                 <artwork><![CDATA[
PUT /reilly/prefs HTTP/1.1
Content-Type: application/x.atom+xml
 
<?xml version="1.0" encoding='iso-8859-1'?>
<userprefs  xmlns="http://example.com/newformat#" >   
   <name>Reilly</name>
   <id>1234</id>
   <email>sputnik@example.org</email>
</userprefs>]]></artwork>
                 <postamble>Assuming the update goes successfully, 
		   the updated user preferences will be 
		   returned in the response.</postamble>
             </figure>

             <figure>
               <preamble>The reponse would look like: </preamble>
                 <artwork><![CDATA[
HTTP/1.1 200 OK]]></artwork>
             </figure>
           </section>


           <section title="Editing Templates">
             <t>The templates for the user are edited through 
	       the URI supplied in the &lt;edit-template/> element of 
	       the introspection file. Doing an HTTP GET on the edit-template
	       URI retrieves a file that describes all the available templates
	       and their URIs.</t>

             <figure>
               <preamble>Here is an example template description file. </preamble>
                 <artwork><![CDATA[
<resources xmlns="http://example.com/newformat#" >
  <resource>
    <title>Main</title>
    <id>http://example.org/tpl/Main.html</id> 
  </resource>
  <resource>
    <title>Story</title>
    <id>http://example.org/tpl/Stry.html</id>
  </resource> 
  <resource>
    <title>Feed</title>
    <id>http://example.org/tpl/Feed.xml</id> 
  </resource>
</resources>]]></artwork>
                 <postamble>Two important things to note on this file.
		   First is that this list of templates is in no way normative.
		   Secondly, note that templates may have different mime-types.
		 </postamble>
             </figure>

	     <t>To begin editing a template, do a GET on one of the listed URIs.
 	       After the content has been edited the client PUTs the modified
	       content back to the same URI.</t>
           </section>

           <section title="Adding Comments">
	     <t>This part of the AtomAPI does not use the 
	       URIs listed in the Introspection file.</t>
             <t>There are different interfaces now circulating for 
	       an <eref target="http://www.movabletype.org/docs/mtmanual_trackback.html">TrackBack</eref>, 
	       Ping-Back, Post-It. 
	       All of these are systems for adding comment-like
	       information to an Entry. The only 
	       thing missing from the mix is a way to do 
	       comments themselves. This section of the specification 
	       is intended to be a roll-up of all 
	       the above specifications and to cover comments as well.</t>
             <t>Creating a comment is similar to creating an Entry, 
	       that is, you HTTP POST an Entry to a URI. 
	       For now we will defer discussing how to obtain the 
	       corrent URI to POST to. </t>
             <figure>
               <preamble>For example, if  "http://example.org/reilly/1/comments" is 
	         the URI that accepts comments
	         for the first Entry on the website http://example.org/reilly, 
		 then the client would open port 80 on example.org
		 and send:</preamble>
               <artwork><![CDATA[
POST /reilly/1/comments HTTP/1.1
Content-Type: application/x.atom+xml

<entry xmlns="http://example.com/newformat#" > 
  <title>My Comment</title> 
  <author> 
    <name>Fred F. Fobbington</name> 
  </author> 
  <created>2003-02-05T12:29:29</created> 
  <content type="application/xhtml+xml" xml:lang="en-us"> 
    <p xmlns="...">Welcome to the neighborhood!</p> 
  </content>  
</entry> ]]></artwork>
                 <postamble>This would create a new comment for the
		   first Entry on "http://example.org/reilly".</postamble>
             </figure>

             <figure>
               <preamble>The response to this POST, assuming 
	         everything went without error would look like this:</preamble>
               <artwork><![CDATA[
HTTP/1.1 201 Created
Location: http://example.org/reilly/1/comments/1
 ]]></artwork>
                 <postamble>This would create a new comment/trackback 
		   for the first Entry on "http://example.org/reilly". </postamble>
             </figure>

	     <t>Note that the
		   response can contain a Location: header that points to the
		   comment as an Entry. This is not a required feature of the interface.</t>

             <section title="Comment Auto-Discovery">
               <t>Two mechanisms are available for discovering the 
	         URI that you would use to create a comment.
                 The first is a way to put that information in HTML, 
		 the second is a way to embed that information in an Atom feed.</t>
                 <section title="HTML Auto-Discovery">
                   <t>The &lt;link> element has been successful in finding RSS feeds and is appropriate to 
		     use here for discovering the "commentURI" in HTML pages. The <eref target="http://www.w3.org/TR/html401/struct/links.html#edef-LINK">&lt;link></eref> tag goes in the &lt;head> section 
		     of an HTML page and is used to indicate a document relationship. For a similar example of using the link tag 
		     to discover a URI, refer to the usage of 
		     of the link tag for <eref target="http://diveintomark.org/archives/2002/05/30/rss_autodiscovery.html">RSS Auto-Discovery</eref>.
		     In this case the form of the link tag used to indicate the location of the comment URI is:</t>

                   <figure>
                       <artwork><![CDATA[
<link rel="service.comment" type="application/x.atom+xml" 
      href="url goes here" title="AtomComment">]]></artwork>
                   </figure>

                   <t>Where href should be set to the URI that accepts POSTs for comments. 
		     Applications looking for a URI to post comments
		     to  need to parse out the 
		     headers of the web page and look for a link tag that has a 
		     relation rel of "service.comment" and a mime-type of "application/x.atom+xml".
		     </t>
                 </section>
                 <section title="Atom Feed Auto-Discovery">
                   <t>There is a &lt;comment/> element in each Entry 
		     that is used to provide the location of the URI that accepts
		     comment POSTs. This is providing the same information 
		     as the link tag does in HTML. 
		   </t>
                 </section>
             </section>
           </section>
      </section>

      <section title="Functional Specification">
           <section title="Formats" anchor="Func_Formats">
               <t>@@ TBD @@ More formal specification of all the XML formats used in this protocol.</t>
           </section>
           <section title="Actions">
               <t>@@ TBD @@ A more formal specification of all the actions.</t>
               <section title="Create Entry"><t>None.</t></section>
               <section title="Edit Entry"><t>None.</t></section>
               <section title="Delete Entry"><t>None.</t></section>
               <section title="Get List of Entries"><t>None.</t></section>
               <section title="Get User Info"><t>None.</t></section>
               <section title="Set User Info"><t>None.</t></section>
               <section title="Get Categories"><t>None.</t></section>
               <section title="Set Categories"><t>None.</t></section>
           <section title="Result Codes">
               <t>@@TBD@@  Mostly 200 for normal responses, seems that 30X codes for redirects are
                  useful but might make implementations a little harder to implement. @@Ref CommentAPI problems returning a 303 vs 200@@</t>
           </section>
           <section title="Content">
               <t>@@TBD@@ How does an Atom document change when used in these different contexts? Which parts that 
are required when found in a feed become optional when used in creating an Entry?</t>
           </section>
           </section>
        </section>

        <section title="Security Considerations">
        <t>@@TBD@@ Talk here about using HTTP basic and digest authentication.</t>
        <t>@@TBD@@ Talk here about denial of service attacks using large XML files, or the billion laughs DTD attack.</t>
        </section>
        <section title="Revision History">
	     <t>Rev 07 - 06Aug2003 - Removed the use of the RSD file for auto-discovery. Changed copyright
                until a final standards body is chosen. Changed query parameters for the search facet
		to all begin with atom- to avoid name collisions. Updated all the Entries to follow
		the 0.2 version. Changed the format of the search results and template file
                to a pure element based syntax.</t>
             <t>Rev 06 - 24Jul2003 - Moved to PUT for updating Entries.
	        Changed all the mime-types to application/x.atom+xml. Added template editing. Changed 'edit-entry' to 'create-entry' in the Introspection file
	        to more accurately reflect it's purpose.
	     </t>
             <t>Rev 05 - 17Jul2003 - Renamed everything Echo into Atom. Added version numbers in the Revision history.
	        Changed all the mime-types to application/atom+xml.
	     </t>
             <t>Rev 04 - 15Jul2003 - Updated the RSD version used from 0.7 to 1.0. Change the method of deleting
	        an Entry from POSTing &lt;delete/> to using the HTTP DELETE verb. Also changed the 
	        query interface to GET instead of POST. Moved Introspection Discovery to be up under
	        Introspection. Introduced the term 'facet' for the services listed in the Introspection
	        file.
	     </t>
             <t>Rev 03 - 10Jul2003 - Added a link to the Wiki near the front of the 
	        document. Added a section on finding an Entry. Retrieving an Entry
	        now broken out into it's own section. Changed the HTTP status code for
	        a successful editing of an Entry to 205.
	     </t>
             <t>Rev 02 - 7Jul2003 - Entries are no longer returned from POSTs, instead they are retrieved via GET.
	        Cleaned up figure titles, as they are rendered poorly in HTML. All content-types 
	        have been changed to application/atom+xml.
	     </t>
	     <t>Rev 01 - 5Jul2003 - Renamed from EchoAPI.html to follow the more commonly used format: draft-gregorio-NN.html. Renamed all 
                references to URL to URI. Broke out introspection into it's own section. Added the Revision History section.
                Added more to the warning that the example URIs are not normative.
             </t>
        </section>

        <section title="Copyright">
	  <t>Copyright (C) Joe Gregorio (2003). All Rights Reserved.</t>
	</section>
    </middle>

    <back>
        <references>&rfc2119;</references>
    </back>

</rfc>






