<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt'?>

<?rfc toc='yes'?>
<?rfc tocompact='yes'?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>

<rfc number="6861" category="info" submissionType="independent">

<front>
<title abbrev="create-form and edit-form">The &quot;create-form&quot; and &quot;edit-form&quot; Link Relations</title>
<author fullname="Ioseb Dzmanashvili" surname="Dzmanashvili" initials="I.D.">
  <address>
    <email>ioseb.dzmanashvili@gmail.com</email>
  </address>
</author>
<date month="January" year="2013"/>

<abstract>
<t>
     RFC 5988 standardized a means of indicating the relationships between
     resources on the Web. &nbsp;This specification defines link relation
     types that may be used to express the relationships between a
     resource and an input form for constructing data submissions.
</t>
</abstract>

</front>

<middle>
<section title="Introduction" toc="default">
<t>
  <xref target="RFC5988" format="default">RFC 5988</xref> standardized a
       means of indicating the relationships between resources on the
       Web. &nbsp;This specification defines link relation
       types that may be used to express the relationships between a
       resource and an input form for constructing data submissions.
</t>
<t>
   The "create-form" and "edit-form" link relations are intentionally generic, and they can be used with multiple media types in a wide variety of use cases.
</t>
</section>

<section title="Notational Conventions" toc="default">
<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="Link Relations" anchor="link_rel" toc="default">
  <t>
    The following link relations are defined.
  </t>

  <section title='The "create-form" Link Relation Type' toc="default">
  <t>
    When included in a response, the "create-form" link relation indicates a target resource
  that represents a form that can be used to append a new member to the link context.
</t>
<figure><artwork><![CDATA[
<html>
  <ul>
    <li>Entry Description 1</li>
    <li>Entry Description 2</li>
  </ul>
  <a href="..." rel="create-form">[Add New Entry]</a>
</html>
]]></artwork></figure>
<t>or, expressed as a Link header</t>
<figure><artwork><![CDATA[
Link: <...>; rel="create-form"; title="Add New Entry"
]]></artwork></figure>

    <section title='Using the "create-form" Link Relation' toc="default">
      <t>
        If the form representation includes a submission URI, this URI MUST be used
  to submit the form. The context URI SHOULD be used otherwise.
      </t>
      
      <t>
        If the form representation includes a submission method, this method MUST be
  used for submit requests. HTTP's POST method SHOULD be used otherwise.
      </t>
      </section>
  </section> <!-- /form example-->
  <section title='The "edit-form" Link Relation Type' toc="default">
    <t>
     When included in a response, the "edit-form" link relation indicates
  a target resource that represents a form that can be used for updating
  the context resource.
    </t>
<figure><artwork><![CDATA[
<html>
 ...
 <ul>
   <li>
     Entry Description 1
     <a href="..." rel="edit-form">[Edit Entry]</a>
   </li>
 </ul>
 ...
</html>
]]></artwork></figure>
<t>or, expressed as a Link header</t>
<figure><artwork><![CDATA[
Link: <...>; rel="edit-form"; title="Edit Entry"
]]></artwork></figure>

    <section title='Using the "edit-form" Link Relation' toc="default">
      <t>
        If the form representation includes a submission URI, this URI MUST be used
  to submit the form. The context URI SHOULD be used otherwise.
      </t>
      
      <t>
        If the form representation includes a submission method, this method MUST be
  used for submit requests. HTTP's PUT method SHOULD be used otherwise.
      </t>
    </section>
  </section> <!-- /edit-form example -->
  <?rfc needLines="40"?>
  <section title="Error-Handling Example" toc="default">
    <t>
        When submitting forms in unsupported media type format, service may respond to the client with HTTP's 415 Unsupported Media Type status code.
      </t>
      <figure><artwork><![CDATA[
  HTTP/1.1 415 Unsupported Media Type
  Link: <...>; rel="create-form"; title="Create new entry"
  Content-Type: text/html
  Content-Length: ...
  
  <html>
    Use <a href="..." rel="create-form">
      this form
    </a> to create a new entry.
  </html>]]>
  </artwork></figure>
  </section>
</section>
<section title="IANA Considerations" toc="default">
<t>
  IANA has registered the "create-form" and "edit-form" link relations below as per 
  <xref target="RFC5988"/>.
</t>
<section title='The Link Relation Registration "create-form"' toc="default">
  <t>
    Relation Name:
    <list>
      <t>
        create-form
      </t>
    </list>
  </t>
  <t>
    Description:
    <list>
      <t>
        The target IRI
        points to a resource where a submission form can be obtained.
      </t>
    </list>
  </t>
  <t>
    Security considerations:
    <list>
      <t>
        Automated agents should take care when this
        relation crosses administrative domains (e.g., the URI has a
        different authority than the current document).
      </t>
    </list>
  </t>
  <t>
    Reference:
    <list>
      <t>
        See <xref target="link_rel"/>.
      </t>
    </list>
  </t>
</section> <!-- /form -->

<section title='The Link Relation Registration "edit-form"' toc="default">
  <t>
    Relation Name:
    <list>
      <t>
        edit-form
      </t>
    </list>
  </t>
  <t>
    Description:
    <list>
      <t>
        The target IRI points to a resource where a submission form for editing
        the associated resource can be obtained.

      </t>
    </list>
  </t>
  <t>
    Security Considerations:
    <list>
      <t>
        Automated agents should take care when this
        relation crosses administrative domains (e.g., the URI has a
        different authority than the current document).
      </t>
    </list>
  </t>
  <t>
    Reference:
    <list>
      <t>
        See <xref target="link_rel"/>.
      </t>
    </list>
  </t>
</section> <!-- /edit-form -->
</section>
<section title="Security Considerations" toc="default">
<t>
  See Section 7 of <xref target="RFC5988">RFC 5988</xref>.
</t>
</section>
<section title="Internationalisation Considerations">
<t>
  See Section 8 of <xref target="RFC5988">RFC 5988</xref>.
</t>
</section>
</middle>

<back>
  <references title="Normative References">

<reference anchor="RFC2119">
    <front>
      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
       <author initials="S." surname="Bradner" fullname="Scott Bradner">
       <organization/></author>
      <date month="March" year="1997"/>
    </front>
    <seriesInfo name="BCP" value="14"/>
    <seriesInfo name="RFC" value="2119"/>
  </reference>

<reference anchor="RFC5988">
  <front>
    <title>Web Linking</title>
      <author initials="M." surname="Nottingham" fullname="M. Nottingham">
      <organization /></author>
    <date month="October" year="2010" />
  </front>
  <seriesInfo name="RFC" value="5988" />
</reference>

  </references>

  <section anchor="app-additional" title="Acknowledgements">
    <t>The author gratefully acknowledges the contributions of Jan
    Algermissen.</t>
  </section>
</back>
</rfc>
