<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
   <!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
   <!ENTITY rfc2246 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2246.xml'>
   <!ENTITY rfc2396 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2396.xml'>
   <!ENTITY rfc2616 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml'>
   <!ENTITY rfc2617 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2617.xml'>
]>
<!-- 

$LastChangedDate: 2004-09-23 20:22:23 -0400 (Thu, 23 Sep 2004) $
$LastChangedRevision: 72 $

--> 

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

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="yes" ?>
<?rfc strict="yes" ?>
<?rfc compact="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?
    xxx 7. change to x.atom+xml--> <!-- changed to atom+xml -RS -->
    <!--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="full3667" docName="draft-ietf-atompub-protocol-02.txt">
        <front>
			<title>The Atom Publishing Protocol</title>
            <author initials='J.C.' surname="Gregorio" fullname='Joe Gregorio' role="editor">
                <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>
	     <author initials="R.F." surname="Sayre" fullname="Robert Sayre" role="editor">
	      <organization>Boswijck Memex Consulting</organization>
	      <address>
		<postal>
		  <street>148 N 9th St. 4R</street>
		  <city>Brooklyn</city> <region>NY</region> <code>11211</code>
		  <country>US</country>
		</postal>
		<email>rfsayre@boswijck.com</email>
		<uri>http://boswijck.com</uri>
	      </address>
	  </author>
	  <date day="21" month="September" year="2004"/>
	  <abstract><t>This memo presents a protocol for 
			  using XML (Extensible Markup Language) and HTTP (HyperText Transport Protocol)
			  to edit content. </t>

		  <t>The Atom Publishing Protocol is an application-level protocol for publishing and editing Web resources
			  belonging to periodically updated websites. The protocol at its core is the HTTP transport 
			  of Atom-formatted representations. The Atom format is documented in
			  the Atom Syndication Format (draft-ietf-atompub-format-02.txt).
		  </t>

	  </abstract>
	  <note title="Editorial Note">
		  <t>To provide feedback on this Internet-Draft, 
			  join the <eref target="http://www.imc.org/atom-syntax/index.html"> 
				  atom-syntax mailing list (http://www.imc.org/atom-syntax/index.html)</eref>.
		  </t>
	  </note>
	  </front>

        <middle>

            <section title="Introduction">
	      <t>The Atom Publishing Protocol is an application-level protocol for publishing
			  and editing Web resources using HTTP <xref target="RFC2616"/> and XML.</t>  
		 <section title="Notational Conventions">
		   <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
                    "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 
                    and "OPTIONAL" in this document are to be interpreted as    
					described in <xref target="RFC2119"/>.
		   </t> 

		</section>
                <section title="Terminology">
                    <t>
                        <list style="hanging">
							<t hangText="Atom Entry:">
								An Atom Entry is a fragment of a full Atom feed. In this case, the fragment is
								a single 'entry' element and all its child elements. Each Atom Entry 
								describes a single Web resource, providing 
								metadata and optionally a textual representation 
								of that resource.
							</t>
                            <t hangText="PostURI:">
                                A URI that is used to create new resources. POSTing an 
                                Atom Entry to this URI will create a new resource.
                            </t>
                            <t hangText="EditURI:">
                                A URI that is used to edit a resource. The editing is done using
                                the HTTP verbs GET, PUT and DELETE. The representation of the
                                resource is always that of an Atom Entry.
                            </t>
							<t hangText="FeedURI:"> 
								The URI which identifies an Atom Feed.
                            </t>
                        </list>
                    </t>
                </section>
			</section>
			<section title="The Atom Publishing Protocol Model">
				<t>The Atom Publishing Protocol 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:
					<list style="symbols">
						<t>GET is used to retrieve a representation of 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.</t>
						<t>DELETE is used to remove a resource.</t>
					</list>
				</t>

				<t>There are four major classes of URI <xref target="RFC2396"/> in this specification: PostURI,
					ResourcePostURI, FeedURI, and EditURI. This specification defines the expected actions
					for each of the methods listed. A URI MAY support methods not listed here. 
					For example, an EditURI could support a POST or OPTIONS method. 
					However, what those methods do is beyond the scope of this specification.
					<list style="symbols">
						<t>EditURI: PUT, GET, DELETE</t>
						<t>PostURI: POST</t>
						<t>FeedURI: GET</t>
						<t>ResourcePostURI: POST</t>
					</list>
				</t>
				<t>This document 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 document 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="Functional Specification">
                <section title="PostURI" anchor="Post">
					<t>The PostURI is used to create entries. These can be either full 
						entries, such as a weblog post, or they can be comments, or 
						even a wiki page. The client 
						POSTs a filled-in Atom Entry to this URI. If the request is successful,
						one or more Web resources MAY be created. For example, POSTing an Atom entry 
						to a PostURI may create two new Web resources, an HTML representation
                        and an Atom representation. 
					</t>
					<section title="Locating the PostURI" anchor="Post.Locating">
						<t>The PostURI can be discovered in a link element with 
							an @rel of 'service.post'. The link element 
							containing a PostURI used to create a new entry MAY be discovered
							in three different places. The first place it may be found
							is in a &lt;link> element in the 'head' element of an HTML document.</t>
						<t>The second place a PostURI may be found an atom:link
							element that is a child of the atom:feed element.
							The third place a PostURI may be found is in 
							the atom:link element of an atom:entry.
						</t>
						<t>@@ TBD @@ - Discuss subordinate resources
							and what a PostURI means based on where the 
							URI was found. 
						</t>

                        <figure>
							<artwork>
&lt;link rel="service.post"
      type="application/atom+xml"
      href="URI for Posting goes here"
      title="The name of the site." /></artwork>
                        </figure>

                    </section>
                    <section title="Request" anchor="Post.Request">
                        <t>The request contains a filled-in Atom entry, subject to 
							the constraints in section <xref target="constraints"/>.
                        </t>
                    </section>

                    <section title="Response" >
                        <t>The possible status codes from a POST are 201, 303, 
							400, 404, 409, 410 and 500. 
                        </t>
                        <section title="Response code 201" >
                           	<t>The Response MUST include a Location: header with the URI of the 
								created resource. The URI returned must be the EditURI of the 
								entry just created. The body of the response SHOULD contain the 
								newly created entry. If the entry is present in the response body 
								then it MUST conform to the same constraints listed for responses 
								to a GET on an EditURI. User agents MUST NOT depend on the server 
								returning a response body. If the server does return a response body 
								then the user agents MUST NOT depend on the response body having a 
								content-type of 'application/atom+xml". Note that the server may 
								choose to omit the content in the response, particularly if it is large.
							</t>

							<t>A 201 response MAY contain an ETag response header field indicating 
								the current value of the entity tag for the requested variant just created.
							</t>

							<t>If the entry returned is subsequently changed the user agent can update the 
								entry by submitting it via PUT to the EditURI. If an ETag was returned with 
								the creation of the entry then the user agent SHOULD include an 
								If-Match: header in the request that contains that ETag. 
							</t>
                        </section>

                        <section title="Response code 303" >
                            <t>The body of this response does not contain the filled-in Entry, 
                                but the filled-in Entry can be found under a different URI and 
                                can be retrieved using a GET method on that resource. The 
                                URI SHOULD be given by the Location field in the response.
                            </t>
                        </section>

			<section title="Response code 400" >
                            <t>Indicates that the server believes that the data sent constitutes 
			    an invalid request. As an example, the data posted may not be
			    well-formed XML. The server SHOULD include an entity containing 
			    an explanation of the error situation, and whether it is a temporary 
			    or permanent condition.
                            </t>
                        </section> 

			<section title="Response code 409" >
			  <t>The request contained a valid Atom Entry, but it conflicts with state on the server.
			  The response SHOULD contain enough for information for the user to resolve the conflict.
			  </t>
			  <t>[[@@TBD@@ more about response body format]]</t>
			</section>

                        <section title="Response code 500" >
                            <t>Indicates that the server detected an internal error on the server 
			    processing this request (such as an unhandled exception).
			    The server SHOULD include an entity containing an explanation of the
			    error situation, and whether it is a temporary or permanent
			    condition. 
                            </t>
                        </section>
                    </section>
                </section>


                <section title="EditURI" anchor="Edit">
                    <t>An EditURI is used to edit a single entry. Each entry that is editable
                        MUST have a unique URI. This URI supports both GET and PUT and they are
                        used in tandem for an editing cycle. The client GETs the representation
                        which is formatted as an Atom entry. The client may then update the 
                        entry and then PUT it back to the same URI. The PUT will cause all
                        the related resources to be updated, for example, the HTML representation.
                    </t>
                    <t>Note that the value of the content element in the Atom entry does not
                        have to exactly match the content element for the same entry
                        when it is represented in an Atom feed. For example, a server may allow
                        the client to post entries whose content is formatted as WikiML, yet 
                        the server may clean up such markup and transform it into well-formed XHTML
                        before placing it in the publicly available Atom feed. Another scenario
                        is summaries--the EditURI is for editing the full content of an entry, but the
                        server may only present excerpts when it produces an Atom feed.
                    </t>
                    <t>A client will send a DELETE to the EditURI to delete an entry.</t>
                    <section title="Locating" anchor="Edit.Locating">
		      <t>For editing a site Entry, the link tag is used. 
		      Note that a link tag is used in both HTML and in the Atom 
		      format. A link tag of the following format points to the 
		      EditURI for a site. In HTML, the link tags for editing are always found
		      in the head element, while in Atom they may appear as children 
		      of the entry elements.
		      </t>

                        <figure>
							<artwork>
&lt;link rel="service.edit"
      type="application/atom+xml"
      href="URI for Editing goes here"
      title="Readable desc of the entry." /></artwork>
                        </figure>

                        <t>Note: The critical characteristic of this link tag is the 
                            @rel of 'service.edit' and the @type of 'application/atom+xml'.
                        </t>
                    </section>
                    <section title="Request" anchor="Edit.Request">
                        <t>A PUT request, and a GET response both 
			contain a filled-in Atom entry, subject to 
			the constraints in section <xref target="constraints"/>.
                        </t>
                        <t>The expected status codes from a GET are 200, 301, 307,                           
			and 500. 400, 404, and 410 are also possible.                          
                        </t>
                        <t>The expected status codes from a PUT are 2xx, 301, 307,                           
			500 and 501. 400, 404, 409, and 410 are also possible.                          
                        </t>

			<section title="Successful Requests" >
			  <t>Servers MUST indicate successful GET requests with a 200 response.</t>
			  <t>Servers MUST indicate successful PUT requests with a 2xx response. Servers 
			  MAY include additional information in the PUT response. Clients SHOULD NOT 
			  expect any additional information in a PUT response.
			  </t>
			</section> 
			

			<section title="Response code 301" >
			  <t>The entry has moved permanently, the new URI is given in the
			  Location header. The client SHOULD retry the GET
			  using the URI returned in the Location header. When a PUT 
			  operation is attempted the user agent should prompt the 
			  user before attempting the PUT on the URI returned in the Location
			  header.
			  </t>
			</section>
			
			<section title="Response code 307" >
			  <t>The entry has moved temporarily, the new URI is given in the
			  Location header. The client SHOULD retry the GET
			  using the URI returned in the Location header.  When a PUT 
			  operation is attempted the user agent should prompt the 
			  user before attempting the PUT on the URI returned in the Location
			  header.
			  </t>
			</section>
			
			<section title="Response code 401" >
			  <t>Indicates that the server believes that the data sent constitutes 
			  an invalid request. As an example, the data posted may not be
			  well-formed XML. The server SHOULD include an entity containing 
			  an explanation of the error situation, and whether it is a temporary 
			  or permanent condition.
			  </t>
			</section> 
			
			<section title="Response code 409">
			  <t>The request contained a valid Atom Entry, but it conflicts with the state of the resource,
			  or other state on the server. 
			  </t>
			  <t>For example, a server could signal that the client has erred in this manner if it receives a 
			  request containing an atom:id element whose value differs from that of the resource found at the
			  requested URI.
			  </t>
			  <t>The response SHOULD contain enough for information for the 
			  user to resolve the conflict.
			  </t>
			  <t>[[@@TBD@@ more about response body format ]]</t>
			</section>

			<section title="Response code 410" >
			  <t>Indicates that the requested resource is gone permanently.
			  The client SHOULD NOT repeat the request.
			  </t>
                        </section> 

                        <section title="Response code 500" >
			  <t>Indicates that the server detected an internal error on the server 
			  processing this request (such as an unhandled exception).
			  The server SHOULD include an entity containing an explanation of the
			  error situation, and whether it is a temporary or permanent
			  condition. 
			  </t>
                        </section>
 

                    </section>
                </section>




                <section title="FeedURI" anchor="FeedURI">
                    <t>The FeedURI is used to retrieve a representation in Atom format. 
                        Note that this feed is different from a typical Atom feed
                        in that it contains "link" elements for navigating
                        and manipulating the content of the site. For example
                        there should be a "link" element with rel="next" whose
                        URI points to the next block of entries on the site. Similarly,
                        the feed element can contain a "link" element with 
                        rel="service.post", the URI of which is a PostURI. 
                        Individual entries should contain "link" elements with 
                        rel="service.edit" whose URIs are EditURIs.
                    </t>
		    <t>This document only uses some of the methods available
		    for each type of URI. For example, the only method 
		    described by this document for the FeedURI is GET. Any
		    other method may be supported by the URI types described, but
		    defining their behavior is beyond the scope of this document.
		    In this light you may notice that the PostURI only supports 
		    the POST method. It is possible,
		    and allowable, that for some implementations the 
		    PostURI and the FeedURI are the same URI.
		    </t>
                    <t>@@ Editor's Note: @@ Note that the "service.feed" takes the 
                        place of the Introspection File and the Search facet 
                        in previous versions of the specification. That is, facet discovery,
                        which was previously done by inspecting the Introspection file is now
                        done by looking for "link" tags with an attribute "rel" set to 
                        "service.[something]" in the "service.feed" file. 
                        At the same time the same representation replaces the 
                        search facet by having "link" tags that point to other feeds using
                        well-known 'rel' attribute values such as 'next' and 'prev', or the 
                        search can branch in multiple directions by specifying multiple link
                        tags with rel="service.feed" and having differing title attributes that 
                        announce the kind of search results in that feed.
                    </t>
                    <section title="Locating" anchor="Feed.Locating">
                        <t>A link tag of the following format points to the 
                            FeedURI. 
                        </t>

                        <figure>
							<artwork>
&lt;link rel="service.feed"
      type="application/atom+xml"
      href="URI goes here"
      title="The name of the site." /></artwork>
                        </figure>

                    </section>
                    <section title="Request" anchor="Feed.Request">
                        <t>The request is a simple GET. No other verbs are currently
                            specified for this URI.
                        </t>
                    </section>

                    <section title="Response" anchor="Feed.Response"> 
                        <t>The expected status codes from a GET are 200, 301, 307,                           
                            and 500. 401, 404, and 410 are also possible.                          
                        </t>

                        <section title="Response code 301" >
                            <t>The Feed has moved permanently, the new URI is given in the
			    Location header. The client SHOULD do a GET on the 
			    URI returned in the Location header.
                            </t>
                        </section>

                        <section title="Response code 307" >
                            <t>The Feed has moved temporarily, the new URI is given in the
			    Location header. The client SHOULD do a GET on the 
			    URI returned in the Location header.
                            </t>
                        </section>

                    </section> <!-- End response -->
                </section><!-- End Feed -->
		<section title="ResourcePostURI">
		  <t>The ResourcePostURI is used to create new non-entry resources. The client POSTs a 
		  resource of the desired MIME type directly to this URI. 
		  </t>
		  <section title="Locating">
		    <t>For creating a new non-entry resource, the link tag is used.
		    Note that a link tag is used in both HTML and in the Atom format. A link tag of the
		    following format points to the ResourcePostURI for a site. In HTML the link tags are
		    always found in the head element, while in Atom they may appear as children of the Feed
		    and entry elements.
		    </t>
		    <t>&lt;link rel="resource.post" href="URI for Resource Posting goes here" title="The name of the site."></t>
		  </section>
		  <section title="Request">
		    <t>The request contains a resource, sent through a standard HTTP POST, e.g.:</t>
		    <figure>
		      <artwork>
POST /_do/exampleblog/post_resource HTTP/1.1
Host: www.example.com
Content-Type: image/jpeg
Content-Length: nnn

...raw bytes of image go here...
		      </artwork>
		    </figure>
		  </section>
		  <section title="Response">
		    <t>The expected status codes from a POST are 201, 303, 400, 415, and 500. 401, 404, 
		    409, and 410 are also possible.
		    </t>
		    <section title="Response code 201">
		      <t>The response MUST include a Location: header with the URI of the created resource,
		      i.e. the URI used to retrieve the resource representation in a subsequent HTTP GET.
		      The server SHOULD omit the content of the resource in the response, since it would be
		      redundant to return it to the client. 
		      </t>
		    </section>
		    <section title="Response code 303">
		      <t>Similar to 201 but no caching is allowed. The response MUST include a Location: header.
		      </t>
		    </section>
		    <section title="Response code 400">
		      <t>Indicates that the server believes that the data sent constitutes 
		      an invalid request. The server SHOULD include an entity containing 
		      an explanation of the error situation, and whether it is a temporary 
		      or permanent condition.
		      </t>
		    </section>
		    <section title="Response code 415">
		      <t>The MIME type of the request entity is not supported by the server for this resource.
		      </t>
		      <t>The response SHOULD contain enough for information for the user to resolve the conflict.
		      </t>
		      <t>[[@@TBD@@ more about response body format ]]</t>
		    </section>
		    <section title="Response code 500">
		      <t>Indicates that the server detected an internal error on the server processing this 
		      request (such as an unhandled exception). A short description of the error will appear 
		      on the status line itself. A longer description will appear in the body.
		      </t>
		    </section>
		  </section>
		</section>
                <section title="Link Tag">
                    <t>The link tag is used in both HTML and Atom formats. There are slight differences
                        between the two usages. Here are the commonalities, differences, 
                        and a list of well-known values for the rel attribute.
                    </t>
                    <t><eref target="http://www.w3.org/TR/html4/struct/links.html#edef-LINK">
                        The link tag in HTML documents</eref> appears in the 'head' of the document.
                        The 'head' section only allows a linear list of 'link' tags.
                        The Atom format allows 'link' tags as children of both the
                        'feed' element and of the 'entry' element. Note that this gives the information
                        present in the link tag more context. 
                        For example ... @@ TBD @@
                    </t>
                    <section title="rel">
                        <t>This attribute describes the relationship 
                            from the current document, be it HTML or Atom, to the 
                            anchor specified by the href attribute. The value of this 
                            attribute is a space-separated list of link types.
                            Note that these values are case insensitive. When used in 
			    concert with type="application/atom+xml",
                            the relations may be interpreted as follows.
                            <list style="hanging">
                                <t hangText="alternate:">
                                    The URI in the href attribute points to an alternate
                                    representation of the containing resource.
                                </t>
                                <t hangText="start:">
                                    The Atom feed at the URI supplied in the href attribute
                                    contains the first feed in a linear sequence of entries.
                                </t>
                                <t hangText="next:">
                                    The Atom feed at the URI supplied in the href attribute
                                    contains the next N entries in a linear sequence of entries.
                                </t>
                                <t hangText="prev:">
                                    The Atom feed at the URI supplied in the href attribute
                                    contains the previous N entries in a linear sequence of entries.
                                </t>
                                <t hangText="service.edit:">
                                    The URI given in the href attribute is used 
                                    to edit a representation of the referred resource.
                                </t>
                                <t hangText="service.post:">
                                    The URI in the href attribute is used to create
                                    new resources.
                                </t>
                                <t hangText="service.feed:">
                                    The URI given in the href attribute is a starting point
                                    for navigating content and services.
                                </t>
                            </list>
                        </t>
                    </section>
                    <section title="href">
                        <t>
                            URI of the resource being described by this link element.
                        </t>
                    </section>
                    <section title="title">
                        <t>
                            Offers advisory information about the link. Rendered to the user to help
                            them choose among a set of links with the same rel and type attributes.
                        </t>
                    </section>
                    <section title="type">
                        <t>
                            The content type of the resource available at the URI given in the
                            href attribute of the link element. Most of the link types in this
                            specification are on type 'application/atom+xml'.
                        </t>
                    </section>
                </section>


		<section title="Atom Request and Response Body Constraints" anchor="constraints">
                    <t>The Atom format is used as the representation 
                        of all the resources in this specification. As it is used in 
                        differing contexts, there are different constraints
                        of which elements may be present, and how their values should 
                        be interpreted. 
                    </t>
                    <section title="id" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">
                                    MUST NOT be present.
                                </t>
                                <t hangText="FeedURI">
                                    MUST be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MUST be present.
                                        </t>
                                        <t hangText="PUT">
                                            MUST be present.
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="link" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">
                                    MAY be present. Servers MAY use the 
                                    information to determine the URI of the created resource. 
                                    Relative URLs are to be interpreted relative to xml:base.
                                </t>
                                <t hangText="FeedURI">
                                    MUST be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MUST be present.
                                        </t>
                                        <t hangText="PUT">
                                            MUST be present.
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="title" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">
                                    MUST be present.
                                    The element may be empty, to explicitly indicate "no title". 
                                    Servers SHOULD NOT try to generate a title if one is not 
                                    provided. The type attribute MAY be present, and if not it
                                    defaults to "text/plain". If present, it MUST represent a MIME 
                                    type that the server supports.
                                    The mode attribute MAY be present. If not present, it defaults 
				    to "xml". If present, it MUST be "xml", "base64", or "escaped".
                                </t>
                                <t hangText="FeedURI">
                                    MUST be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MUST be present.
                                        </t>
                                        <t hangText="PUT">
                                            MUST be present. The element may be empty, 
                                            to explicitly indicate "no title". 
                                            Servers SHOULD NOT try to generate a title if one is not 
                                            provided.
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="summary" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MAY be present. If not present, the server is welcome to 
                                    produce its own summary. If present but empty, the 
                                    server SHOULD NOT generate a summary of its own.
                                    The type attribute MAY be present. If not, it defaults 
                                    to "text/plain". If present, it must represent a MIME type that the server supports.
                                    The mode attribute MAY be present and defaults to "xml". 
                                    If present, it must be "xml","base64", or "escaped".
                                </t>
                                <t hangText="FeedURI">
                                    MAY be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MAY be present.
                                        </t>
                                        <t hangText="PUT">
                                            MAY be present. The element may be empty, 
                                            to explicitly indicate "no summary". 
                                            Servers SHOULD NOT try to generate a title if one is not 
                                            provided.
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="content" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MAY be present but may be empty, to explicitly indicate "no content".
                                    The type attribute MAY be present, but defaults to "text/plain" if not present.
                                    It must represent a MIME type that the server supports. 
                                    The MODE attribute may be present and defaults to "xml" if not present.
                                    It must be "xml","base64", or "escaped".
                                </t>
                                <t hangText="FeedURI">
                                    MAY be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MAY be present.
                                        </t>
                                        <t hangText="PUT">
                                            MAY be present. The element may be empty, 
                                            to explicitly indicate "no content". 
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="issued" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MUST be present, but may be empty, in which case it signifies
                                    "now" in the time zone of the server.
                                </t> 
                                <t hangText="FeedURI">
                                    MUST be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MUST be present.
                                        </t>
                                        <t hangText="PUT">
                                            MUST be present. Server policy determines
                                            if an updated time is accepted.
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="modified" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MUST NOT be present.
                                </t>
                                <t hangText="FeedURI">
                                    MAY be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MAY be present.
                                        </t>
                                        <t hangText="PUT">
                                            MAY be present. The element may be empty, 
                                            to explicitly indicate that 'now' on the 
                                            server time is to be used. 
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="created" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MAY be present.
                                </t>
                                <t hangText="FeedURI">
                                    MAY be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MAY be present.
                                        </t>
                                        <t hangText="PUT">
                                            MAY be present. The server may or may not
                                            accept an updated value. If the server does 
                                            not allow updating the issued time then any
                                            PUT request with a different issued value
                                            MUST be rejected.
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="author" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MAY be present. If not present, the server determines
                                    the author. If present, and conflicting with valid values
                                    as determined by the server, then the server may change
                                    the value of author.
                                </t>
                                <t hangText="FeedURI">
                                    MAY be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MAY be present.
                                        </t>
                                        <t hangText="PUT">
                                            MAY be present. 
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="contributor" >
                        <t>
                            <list style="hanging">
                                <t hangText="PostURI">MAY be present. 
                                </t>
                                <t hangText="FeedURI">
                                    MAY be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MAY be present.
                                        </t>
                                        <t hangText="PUT">
                                            MAY be present. 
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>

                    <section title="generator" >
                        <t>
                            <list style="hanging">
								<t hangText="PostURI">MUST be present and 
									contain a URI. The 
                                    value of the element indicates the 
                                    code base used to create this request.
                                    MUST also have an attribute 'version' with a version number.
                                </t>
                                <t hangText="FeedURI">
                                    MUST NOT be present.
                                </t>
                                <t hangText="EditURI">
                                    <list style="hanging">
                                        <t hangText="GET">
                                            MUST NOT be present.
                                        </t>
                                        <t hangText="PUT">
                                            MUST NOT be present. 
                                        </t>
                                    </list>
                                </t>
                            </list>
                        </t>
                    </section>
                </section>
		<section title="Securing the Atom Protocol">
		  <t>All instances of publishing Atom entries SHOULD be protected by authentication 
		  to prevent posting or editing by unknown sources. Atom servers and clients MUST 
		  support one of the following authentication mechanisms, and SHOULD support 
		  both.
		  </t>
		  <t>
		    <list style="symbols">
		      <t>HTTP Digest Authentication <xref target="RFC2617" /></t>
		      <t>[@@TBD@@ CGI Authentication ref]</t>
		    </list>
		  </t>
		  <t>
		    Atom servers and clients MAY support encryption of the Atom session using TLS <xref target="RFC2246" />.
		  </t>
		  <t>
		    There are cases where an authentication mechanism may not be 
		    required, such as a publicly editable Wiki, or when using 
		    the PostURI to post comments to a site that does not
		    require authentication to create comments.
		  </t>
		  <section title="[@@TBD@@ CGI Authentication]">
		    <t>This authentication method is included as part of the protocol to allow 
		    Atom servers and clients that cannot use HTTP Digest Authentication but 
		    where the user can both insert its own HTTP headers and create a CGI program 
		    to authenticate entries to the server. This scenario is common in environments 
		    where the user cannot control what services the server employs, but the user 
		    can write their own HTTP services.
		    </t>
		  </section>
		</section>
	      </section><!-- End Functional Spec -->
	    <section title="Security Considerations">
	      <t>Because Atom is a publishing protocol, it is important that only 
	      authorized users can create and edit entries.</t>
	      <t>
	      The security of Atom is based on HTTP Digest Authentication and/or [@@TBD@@ CGI Authentication]. 
	      Any weaknesses in either of these authentication schemes will obviously affect the security of the Atom 
	      Publishing Protocol.
	      </t>
	      <t>Both HTTP Digest Authentication and [@@TBD@@ CGI Authentication] are 
	      susceptible to dictionary-based attacks on the shared secret. If the shared 
	      secret is a password (instead of a random string with sufficient entropy), 
	      an attacker can determine the secret by exhaustively comparing the authenticating 
	      string with hashed results of the public string and dictionary entries.
	      </t>
	      <t>See RFC 2617 for more detailed description of the security 
	      properties of HTTP Digest Authentication.</t>
	      <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="IANA Considerations">
	      <t>This document has no actions for IANA.</t>
	    </section>

	    <section title="Appendix A - SOAP Enabling">
                    <t>All servers SHOULD support the following alternate 
                        interface mechanisms to enable a wider variety of clients
                        to interact with Atom Publishing Protocol servers. The following requirements
                        are in addition to the ones listed in the Functional Specification Section.
                        If a server supports SOAP Enabling then it MUST support
                        all of the following.
                    </t>
                    <section title="Servers">
                        <t>
                            <list style="numbers">
                                <t>
                                    All servers MUST support the limited use of the SOAPAction 
                                    HTTP Header as described below in the Client section.
                                </t>
                                <t>
                                    All servers MUST be able to process well formed XML. Servers need
                                    not be able to handle processing instructions or DTDs.
                                </t>
                                <t>
                                    Servers MUST accept content in a SOAP Envelope, and if they 
                                    receive a request that is wrapped in a SOAP Envelope then they
                                    MUST wrap their responses in SOAP envelopes or produce a SOAP 
                                    Fault. 
                                </t>
                            </list>
                        </t>
                    </section>
                    <section title="Clients">
                        <t>
                            <list style="numbers">
                                <t>
                                    Clients SHOULD use the appropriate HTTP Method when possible. 
                                    When not possible, they should use POST and include a SOAPAction 
                                    HTTP header which is constrained as follows:
                                </t>

                                <t>
                                    SOAPAction: "http://schemas.xmlsoap.org/wsdl/http/[METHOD]"

                                </t>
                                <t>

                                    Where [METHOD] is replaced by the desired HTTP Method.
                                </t>
                                <t>
                                    Clients MAY wrap their XML payload in a SOAP Envelope. 
                                    If so, they must also wrap it in an element which exactly 
                                    matches the HTTP Method. 
                                </t>
                            </list>
                        </t>
                    </section>
                </section>
			<section title="Appendix B - Examples">
                <section title="Example for a weblog">
                    <t>Fill this in with an example for how all the above is
                        used for a weblog. 
                        Start with main HTML page, link tag of type service.feed 
                        to the 'introspection' file.
                        1. Creating a new entry
                        2. Finding an old entry
                        3. editing an old entry
                        4. commenting on a entry (via HTML and Atom)
                    </t>
                </section>
                <section title="Example for a wiki">
                    <t>Fill this in like above but for a wiki.</t>
                </section>
            </section>

           <section title="Revision History">
			   <t>draft-ietf-atompub-protocol-02 - 
				   Incorporates Pace409Response, PacePostLocationMust,
				   and PaceSimpleResourcePosting.
			   </t>

			   <t>draft-ietf-atompub-protocol-01 - 
				   Added in sections on Responses for the EditURI.
				   Allow 2xx for response to EditURI PUTs.
				   Elided all mentions of WSSE. Started adding in some
				   normative references. Added the section "Securing the 
				   Atom Protocol". Clarified that it is possible that the PostURI and FeedURI
				   could be the same URI. Cleaned up descriptions for Response codes
				   400 and 500.
			   </t>
			   <t>Rev draft-ietf-atompub-protocol-00 - 5Jul2004 - 
				   Renamed the file and re-titled the document to conform
				   to IETF submission guidelines. Changed MIME type to match the one
				   selected for the Atom format. Numerous typographical fixes.
				   We used to have two 'Introduction' sections. One of them was
				   moved into the Abstract the other absorbed the Scope section.
				   IPR and copyright notifications were added. 
			   </t>
               <t>Rev 09 - 10Dec2003 - Added the section on SOAP enabled clients
                   and servers.</t>
               
               <t>Rev 08 - 01Dec2003 - Refactored the specification, merging the Introspection
                  file into the feed format. Also dropped the distinction between the 
                  type of URI used to create new entries and the kind used to create comments.
                  Dropped user preferences.</t>

                <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/&gt; 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>
        </middle>
		<back>
			<references title='Normative References'>&rfc2119; &rfc2246; &rfc2396; &rfc2616; &rfc2617; </references>
		</back>
    </rfc>






