<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="exp" docName="draft-johnston-http-category-header-00"
     ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Abbreviated Title">Web Categories</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Sam Johnston" initials="S." surname="Johnston">
      <organization>Australian Online Solutions</organization>

      <address>
        <postal>
          <street>GPO Box 296</street>

          <city>Sydney</city>

          <region>NSW</region>

          <code>2001</code>
        </postal>

        <email>samj@samj.net</email>

        <uri>http://samj.net/</uri>
      </address>
    </author>

    <date day="1" month="July" year="2009" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>http</keyword>

    <keyword>category</keyword>

    <keyword>header</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>This document specifies the Category header-field for HyperText
      Transfer Protocol (HTTP), which enables the sending of taxonomy
      information in HTTP headers.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>A means of indicating categories for resources on the web has been
      defined by Atom <xref target="RFC4287"></xref>. This document defines a
      framework for exposing category information in the same format via HTTP
      headers.</t>

      <t>The atom:category element conveys information about a category
      associated with an entry or feed. A given atom:feed or atom:entry
      element MAY have zero or more categories which MUST have a "term"
      attribute (a string that identifies the category to which the entry or
      feed belongs) and MAY also have a scheme attribute (an IRI that
      identifies a categorization scheme) and/or a label attribute (a
      human-readable label for display in end-user applications).</t>

      <t>Similarly a web resource may be associated with zero or more
      categories as indicated in the Category header-field(s). These
      categories may be divided into separate vocabularies or "schemes" and/or
      accompanied with human-friendly labels.</t>

      <t>[[ Feedback is welcome on the ietf-http-wg@w3.org mailing list,
      although this is NOT a work item of the HTTPBIS WG. ]]</t>

      <section title="Requirements Language">
        <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 BCP 14, <xref
        target="RFC2119"></xref>, as scoped to those conformance targets.</t>

        <t>This document uses the Augmented Backus-Naur Form (ABNF) notation
        of <xref target="RFC2616"></xref>, and explicitly includes the
        following rules from it: quoted-string, token. Additionally, the
        following rules are included from <xref target="RFC3986"></xref>:
        URI.</t>
      </section>
    </section>

    <section title="Categories">
      <t>In this specification, a category is a grouping of resources by
      'term', from a vocabulary ('scheme') identified by an IRI <xref
      target="RFC3987"></xref>. It is comprised of:<list style="symbols">
          <t>A "term" which is a string that identifies the category to which
          the resource belongs.</t>

          <t>A "scheme" which is an IRI that identifies a categorization
          scheme (optional).</t>

          <t>An "label" which is a human-readable label for display in
          end-user applications (optional).</t>
        </list></t>

      <t>A category can be viewed as a statement of the form "resource is from
      the {term} category of {scheme}, to be displayed as {label}", for
      example "'L&ouml;wchen' is from the 'dog' category of 'animals', to be
      displayed as 'Canine'".</t>
    </section>

    <section title="The Category Header Field">
      <t>The Category entity-header provides a means for serialising one or
      more categories in HTTP headers. It is semantically equivalent to the
      atom:category element in Atom <xref target="RFC4287"></xref>.</t>

      <t></t>

      <figure>
        <artwork align="left"><![CDATA[Category           = "Category" ":" #category-value
category-value     = term *( ";" category-param )
category-param     = ( ( "scheme" "=" <"> scheme <"> )
                   | ( "label" "=" quoted-string )
                   | ( "label*" "=" enc2231-string )
                   | ( category-extension ) )
category-extension = token [ "=" ( token | quoted-string ) ]
enc2231-string     = <extended-value, see [RFC2231], Section 7>
term               = token
scheme             = URI]]></artwork>
      </figure>

      <t>Each category-value conveys exactly one category but there may be
      multiple category-values for each header-field and/or multiple
      header-fields per <xref target="RFC2616"></xref>.</t>

      <t>Note that schemes are REQUIRED to be absolute URLs in Category
      headers, and MUST be quoted if they contain a semicolon (";") or comma
      (",") as these characters are used to separate category-params and
      category-values respectively.</t>

      <t>The "label" parameter is used to label the category such that it can
      be used as a human-readable identifier (e.g. a menu entry). Alternately,
      the "label*" parameter MAY be used encode this label in a different
      character set, and/or contain language information as per <xref
      target="RFC2231"></xref>. When using the enc2231-string syntax,
      producers MUST NOT use a charset value other than 'ISO-8859-1' or
      'UTF-8'.</t>

      <section title="Examples">
        <t>NOTE: Non-ASCII characters used in prose for examples are encoded
        using the format "Backslash-U with Delimiters", defined in Section 5.1
        of <xref target="RFC5137"></xref>.</t>

        <t>For example:</t>

        <figure>
          <artwork><![CDATA[Category: dog]]></artwork>
        </figure>

        <t>indicates that the resource is in the "dog" category.</t>

        <figure>
          <artwork><![CDATA[Category: dog; label="Canine"; scheme="http://purl.org/net/animals"]]></artwork>
        </figure>

        <t>indicates that the resource is in the "dog" category, from the
        "http://purl.org/net/animals" scheme, and should be displayed as
        "Canine".</t>

        <t>The example below shows an instance of the Category header encoding
        multiple categories, and also the use of <xref
        target="RFC2231"></xref> encoding to represent both non-ASCII
        characters and language information.</t>

        <figure>
          <artwork><![CDATA[Category: dog; label="Canine"; scheme="http://purl.org/net/animals",
          lowchen; label*=UTF-8'de'L%c3%b6wchen";
          scheme="http://purl.org/net/animals/dogs"]]></artwork>
        </figure>

        <t>Here, the second category has a label encoded in UTF-8, uses the
        German language ("de"), and contains the Unicode code point \u'00F6'
        ("LATIN SMALL LETTER O WITH DIAERESIS").</t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <section title="Category Header Registration">
        <t>This specification adds an entry for "Category" in HTTP to the
        Message Header Registry <xref target="RFC3864"></xref> referring to
        this document:</t>

        <figure>
          <artwork><![CDATA[Header Field Name: Category
Protocol: http
Status: standard
Author/change controller:
    IETF (iesg@ietf.org)
    Internet Engineering Task Force
Specification document(s):
    [ this document ]]]></artwork>
        </figure>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The content of the Category header-field is not secure, private or
      integrity-guaranteed, and due caution should be exercised when using
      it.</t>
    </section>

    <section title="Internationalisation Considerations">
      <t>Category header-fields may be localised depending on the
      Accept-Language header-field, as defined in section 14.4 of <xref
      target="RFC2616"></xref>.</t>

      <t>Scheme IRIs in atom:category elements may need to be converted to
      URIs in order to express them in serialisations that do not support
      IRIs, as defined in section 3.1 of <xref target="RFC3987"></xref>. This
      includes the Category header-field.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

      &RFC2119;

      <reference anchor="RFC2231">
        <front>
          <title>MIME Parameter Value and Encoded Word Extensions: Character
          Sets, Languages, and Continuations</title>

          <author initials="N." surname="Freed">
            <organization></organization>
          </author>

          <author initials="K." surname="Moore">
            <organization></organization>
          </author>

          <date month="November" year="1997" />
        </front>

        <seriesInfo name="RFC" value="2231" />
      </reference>

      <reference anchor="RFC2616">
        <front>
          <title>Hypertext Transfer Protocol -- HTTP/1.1</title>

          <author initials="R." surname="Fielding">
            <organization></organization>
          </author>

          <author initials="J." surname="Gettys">
            <organization></organization>
          </author>

          <author initials="J." surname="Mogul">
            <organization></organization>
          </author>

          <author initials="H." surname="Frystyk">
            <organization></organization>
          </author>

          <author initials="L." surname="Masinter">
            <organization></organization>
          </author>

          <author initials="P." surname="Leach">
            <organization></organization>
          </author>

          <author initials="T." surname="Berners-Lee">
            <organization></organization>
          </author>

          <date month="June" year="1999" />
        </front>

        <seriesInfo name="RFC" value="2616" />
      </reference>

      <reference anchor="RFC3864">
        <front>
          <title>Registration Procedures for Message Header Fields</title>

          <author initials="G." surname="Klyne">
            <organization></organization>
          </author>

          <author initials="M." surname="Nottingham">
            <organization></organization>
          </author>

          <author initials="J." surname="Mogul">
            <organization></organization>
          </author>

          <date month="September" year="2004" />
        </front>

        <seriesInfo name="BCP" value="90" />

        <seriesInfo name="RFC" value="3864" />
      </reference>

      <reference anchor="RFC3986">
        <front>
          <title>Uniform Resource Identifier (URI): Generic Syntax</title>

          <author initials="T." surname="Berners-Lee">
            <organization></organization>
          </author>

          <author initials="R." surname="Fielding">
            <organization></organization>
          </author>

          <author initials="L." surname="Masinter">
            <organization></organization>
          </author>

          <date month="January" year="2005" />
        </front>

        <seriesInfo name="STD" value="66" />

        <seriesInfo name="RFC" value="3986" />
      </reference>

      <reference anchor="RFC3987">
        <front>
          <title>Internationalized Resource Identifiers (IRIs)</title>

          <author initials="M." surname="Duerst">
            <organization></organization>
          </author>

          <author initials="M." surname="Suignard">
            <organization></organization>
          </author>

          <date month="January" year="2005" />
        </front>

        <seriesInfo name="RFC" value="3987" />
      </reference>

      <reference anchor="RFC4287">
        <front>
          <title abbrev="Atom">The Atom Syndication Format</title>

          <author initials="M." surname="Nottingham">
            <organization></organization>
          </author>

          <author initials="R." surname="Sayre">
            <organization></organization>
          </author>

          <date month="December" year="2005" />
        </front>

        <seriesInfo name="RFC" value="4287" />

        <format octets="81922" target="http://www.ietf.org/rfc/rfc4287.txt"
                type="TXT" />

        <format octets="112181" target="http://tools.ietf.org/html/rfc4287"
                type="HTML" />
      </reference>

      <reference anchor="RFC5137">
        <front>
          <title>ASCII Escaping of Unicode Characters</title>

          <author fullname="" initials="J." surname="Klensin">
            <organization></organization>
          </author>

          <date month="February" year="2008" />
        </front>

        <seriesInfo name="RFC" value="5137" />
      </reference>
    </references>

    <references title="Informative References">
      <reference anchor="RFC2068">
        <front>
          <title>Hypertext Transfer Protocol -- HTTP/1.1</title>

          <author initials="R." surname="Fielding">
            <organization></organization>
          </author>

          <author initials="J." surname="Gettys">
            <organization></organization>
          </author>

          <author initials="J." surname="Mogul">
            <organization></organization>
          </author>

          <author initials="H." surname="Nielsen">
            <organization></organization>
          </author>

          <author initials="T." surname="Berners-Lee">
            <organization></organization>
          </author>

          <date month="January" year="1997" />
        </front>

        <seriesInfo name="RFC" value="2068" />
      </reference>

      <reference anchor="draft-nottingham-http-link-header">
        <front>
          <title>Web Linking</title>

          <author initials="M." surname="Nottingham">
            <organization></organization>
          </author>

          <date day="17" month="April" year="2009" />

          <abstract>
            <t>This document specifies relation types for Web links, and
            defines a registry for them. It also defines how to send such
            links in HTTP headers with the Link header-field.</t>
          </abstract>
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-nottingham-http-link-header-05" />

        <format target="http://www.ietf.org/internet-drafts/draft-nottingham-http-link-header-05.txt"
                type="TXT" />
      </reference>

      <reference anchor="OCCI" target="http://purl.org/occi">
        <front>
          <title>Open Cloud Computing Interface (OCCI)</title>

          <author>
            <organization>Open Grid Forum (OGF)</organization>
          </author>

          <author fullname="Andrew Edmonds" initials="A." surname="Edmonds">
            <organization></organization>
          </author>

          <author fullname="Thijs Metsch" initials="T." surname="Metsch">
            <organization></organization>
          </author>

          <author fullname="Sam Johnston" initials="S." surname="Johnston">
            <organization></organization>
          </author>

          <author fullname="Alexis Richardson" initials="A."
                  surname="Richardson">
            <organization></organization>
          </author>

          <date />
        </front>
      </reference>

      <reference anchor="rel-tag-microformat"
                 target="http://microformats.org/wiki/rel-tag">
        <front>
          <title>rel="tag" Microformat</title>

          <author fullname="Tantek &Ccedil;elik" initials="T."
                  surname="&Ccedil;elik">
            <organization></organization>
          </author>

          <author fullname="Kevin Marks" initials="K." surname="Marks">
            <organization></organization>
          </author>

          <author fullname="Derek Powazek" initials="D." surname="Powazek">
            <organization></organization>
          </author>

          <date />
        </front>
      </reference>

      <reference anchor="W3C.REC-html401-19991224"
                 target="http://www.w3.org/TR/1999/REC-html401-19991224">
        <front>
          <title>HTML 4.01 Specification</title>

          <author fullname="David Raggett" initials="D." surname="Raggett">
            <organization></organization>
          </author>

          <author fullname="Arnaud Le Hors" initials="A." surname="Hors">
            <organization></organization>
          </author>

          <author fullname="Ian Jacobs" initials="I." surname="Jacobs">
            <organization></organization>
          </author>

          <date />
        </front>
      </reference>

      <reference anchor="W3C.WD-html5-20090423"
                 target="http://www.w3.org/TR/2009/WD-html5-20090423">
        <front>
          <title>HTML 5</title>

          <author fullname="David Hyatt" initials="D." surname="Hyatt">
            <organization></organization>
          </author>

          <author fullname="Ian Hickson" initials="I." surname="Hickson">
            <organization></organization>
          </author>

          <date day="23" month="April" year="2009" />
        </front>
      </reference>
    </references>

    <section anchor="app-html" title="Notes on use with HTML">
      <t>In the absence of a dedicated category element in HTML 4 <xref
      target="W3C.REC-html401-19991224"></xref> and HTML 5 <xref
      target="W3C.WD-html5-20090423"></xref>, category information (including
      user supllied folksonomy classifications) MAY be exposed using HTML A
      and/or LINK elements by concatenating the scheme and term:</t>

      <figure>
        <artwork><![CDATA[category-link = scheme term
scheme        = URI
term          = token]]></artwork>
      </figure>

      <t>These category-links MAY form a resolveable "tag space" in which case
      they SHOULD use the "tag" relation-type per <xref
      target="rel-tag-microformat"></xref>.</t>

      <t>Alternatively META elements MAY be used:</t>

      <t><list style="symbols">
          <t>where the "name" attribute is "keywords" and the "content"
          attribute is a comma-separated list of term(s)</t>

          <t>where the "http-equiv" attribute is "Category" and the "content"
          attribute is a comma-separated list of category-value(s)</t>
        </list></t>
    </section>

    <section title="Notes on use with Atom">
      <t>Where the cardinality is known to be one (for example, when
      retrieving an individual resource) it MAY be preferable to render the
      resource natively over HTTP without Atom structures. In this case the
      contents of the atom:content element SHOULD be returned as the HTTP
      entity-body and metadata including the type attribute and atom:category
      element(s) via HTTP header-field(s).</t>

      <t>This approach SHOULD NOT be used where the cardinality is guaranteed
      to be one (for example, search results which MAY return one result).</t>
    </section>

    <section anchor="app-acknowledgements" title="Acknowledgements">
      <t>The author would like to thank Mark Nottingham for his work on Web
      Linking <xref target="draft-nottingham-http-link-header"></xref> (on
      which this document was based) and to the authors of <xref
      target="RFC2068"></xref> for specification of the Link: header-field on
      which this is based.</t>

      <t>The author would like to thank members of the OGF's Open Cloud
      Computing Interface <xref target="OCCI"></xref> working group for their
      contributions and others who commented upon, encouraged and gave
      feedback to this draft.</t>
    </section>

    <section anchor="app-history" title="Document History">
      <t>[[ to be removed by the RFC editor should document proceed to
      publication as an RFC. ]]</t>

      <t><list>
          <t>-00<list style="symbols">
              <t>Initial draft based on
              draft-nottingham-http-link-header-05</t>
            </list></t>
        </list></t>
    </section>

    <section anchor="app-issues" title="Outstanding Issues">
      <t>[[ to be removed by the RFC editor should document proceed to
      publication as an RFC. ]]</t>

      <t>The following issues are oustanding and should be addressed:<list
          style="numbers">
          <t>Is extensibility of Category headers necessary as is the case for
          Link: headers? If so, what are the use cases?</t>

          <t>Is supporting multi-lingual representations of the same
          category(s) necessary? If so, what are the risks of doing so?</t>

          <t>Is a mechanism for maintaining Category header-fields required?
          If so, should it use the headers themselves or some other
          mechanism?</t>

          <t>Does this proposal conflict with others in the same space? If so,
          is it an improvement on what exists?</t>
        </list></t>
    </section>
  </back>
</rfc>
