One document matched: draft-hammer-hostmeta-16.xml


<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<rfc category='std' ipr='trust200902' docName='draft-hammer-hostmeta-16'>

  <?rfc strict='yes' ?>
  <?rfc toc='yes' ?>
  <?rfc tocdepth='3' ?>
  <?rfc symrefs='yes' ?>
  <?rfc sortrefs='yes' ?>
  <?rfc compact='yes' ?>
  <?rfc subcompact='no' ?>

  <front>

    <title abbrev='host-meta'>Web Host Metadata</title>

    <author initials='E' surname='Hammer-Lahav' fullname='Eran Hammer-Lahav' role='editor'>
      <organization>
        Yahoo!
      </organization>
      <address>
        <email>eran@hueniverse.com</email>
        <uri>http://hueniverse.com</uri>
      </address>
    </author>

    <author initials='B' surname='Cook' fullname='Blaine Cook'>
      <organization />
      <address>
        <email>romeda@gmail.com</email>
        <uri>http://romeda.org</uri>
      </address>
    </author>

    <date year='2011'/>

    <abstract>
      <t>
        This specification describes a method for locating host metadata as well as information
        about individual resources controlled by the host.
      </t>
    </abstract>

    <note title='Editorial Note (to be removed by RFC Editor)'>
      <t>
        Please discuss this draft on the
        <eref target='https://www.ietf.org/mailman/listinfo/apps-discuss'>apps-discuss@ietf.org</eref>
        mailing list.
      </t>
    </note>

  </front>

  <middle>
    <section title='Introduction'>
      <t>
        Web-based protocols often require the discovery of host policy or metadata, where "host" is
        not a single resource but the entity controlling the collection of resources identified by
        Uniform Resource Identifiers (URI) with a common URI host <xref target='RFC3986'/>.
      </t>
      <t>
        While web protocols have a wide range of metadata needs, they often use metadata that is
        concise, has simple syntax requirements, and can benefit from storing their metadata in a
        common location used by other related protocols.
      </t>
      <t>
        Because there is no URI or representation available to describe a host, many of the methods
        used for associating per-resource metadata (such as HTTP headers) are not available. This
        often leads to the overloading of the root HTTP resource (e.g. 'http://example.com/') with
        host metadata that is not specific or relevant to the root resource itself.
      </t>
      <t>
        This specification registers the well-known URI suffix
        <spanx style='verb'>host-meta</spanx> in the Well-Known URI Registry established by
        <xref target='RFC5785' />, and specifies a simple, general-purpose metadata document format
        for hosts, to be used by multiple web-based protocols.
      </t>
      <t>
        In addition, there are times when a host-wide scope for policy or metadata is too
        coarse-grained. host-meta provides two mechanisms for providing resource-specific
        information:

        <list style='symbols'>
          <t>
            Link Templates - links using a URI template instead of a fixed target URI, providing a
            way to define generic rules for generating resource-specific links by applying the
            individual resource URI to the template.
          </t>
          <t>
            Link-based Resource Descriptor Documents (LRDD, pronounced 'lard') - descriptor
            documents providing resource-specific information, typically information that cannot be
            expressed using link templates. LRDD documents are linked to resources or host-meta
            documents using link templates with the <spanx style='verb'>lrdd</spanx> relation type.
          </t>
        </list>
      </t>

      <section title='Example'>
        <t>
          The following is a simple host-meta document including both host-wide and
          resource-specific information for the 'example.com' host:
        </t>
        <figure>
          <artwork>
            <![CDATA[
  <?xml version='1.0' encoding='UTF-8'?>
  <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
        
    <!-- Host-wide Information -->
    
    <Property type='http://protocol.example.net/version'>1.0</Property>
        
    <Link rel='copyright'
     href='http://example.com/copyright' />
        
    <!-- Resource-specific Information -->
        
    <Link rel='hub'
     template='http://example.com/hub' />

    <Link rel='lrdd'
     type='application/xrd+xml'
     template='http://example.com/lrdd?uri={uri}' />
        
    <Link rel='author'
     template='http://example.com/author?q={uri}' />
     
  </XRD>
]]>
          </artwork>
        </figure>
        <t>
          The host-wide information which applies to host in its entirety provided by the document
          includes:

          <list style='symbols'>
            <t>
              A <spanx style='verb'>http://protocol.example.net/version</spanx> host property with
              a value of <spanx style='verb'>1.0</spanx>.
            </t>
            <t>
              A link to the host's copyright policy (<spanx style='verb'>copyright</spanx>).
            </t>
          </list>
        </t>
        <t>
          The resource-specific information provided by the document includes:

          <list style='symbols'>
            <t>
              A link template for receiving real-time updates (<spanx style='verb'>hub</spanx>)
              about individual resources. Since the template does not include a template variable,
              the target URI is identical for all resources.
            </t>
            <t>
              A LRDD document link template (<spanx style='verb'>lrdd</spanx>) for obtaining
              additional resource-specific information contained in a separate document for each
              individual resource.
            </t>
            <t>
              A link template for finding information about the author of individual resources
              (<spanx style='verb'>author</spanx>).
            </t>
          </list>
        </t>

        <section title='Processing Resource-Specific Information' anchor='resource_example'>
          <t>
            When looking for information about the an individual resource, for example, the
            resource identified by 'http://example.com/xy', the resource URI is applied to the
            templates found, producing the following links:
          </t>
          <figure>
            <artwork>
              <![CDATA[
  <Link rel='hub'
   href='http://example.com/hub' />
        
  <Link rel='lrdd'
   type='application/xrd+xml'
   href='http://example.com/lrdd?uri=http%3A%2F%2Fexample.com%2Fxy' />
        
  <Link rel='author'
   href='http://example.com/author?q=http%3A%2F%2Fexample.com%2Fxy' />
]]>
            </artwork>
          </figure>
          <t>
            The LRDD document for 'http://example.com/xy' is obtained using an HTTP
            <spanx style='verb'>GET</spanx> request:
          </t>
          <figure>
            <artwork>
              <![CDATA[
  <?xml version='1.0' encoding='UTF-8'?>
  <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
  
    <Subject>http://example.com/xy</Subject>

    <Property type='http://spec.example.net/color'>red</Property>

    <Link rel='hub'
     href='http://example.com/another/hub' />
        
    <Link rel='author'
     href='http://example.com/john' />
  </XRD>
]]>
            </artwork>
          </figure>
          <t>
            Together, the information available about the individual resource (presented as an XRD
            document for illustration purposes) is:
          </t>
          <figure>
            <artwork>
              <![CDATA[
  <?xml version='1.0' encoding='UTF-8'?>
  <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
  
    <Subject>http://example.com/xy</Subject>

    <Property type='http://spec.example.net/color'>red</Property>

    <Link rel='hub'
     href='http://example.com/hub' />

    <Link rel='hub'
     href='http://example.com/another/hub' />
        
    <Link rel='author'
     href='http://example.com/john' />
          
    <Link rel='author'
     href='http://example.com/author?q=http%3A%2F%2Fexample.com%2Fxy' />
     
  </XRD>
]]>
            </artwork>
          </figure>
          <t>
            Note that the order of links matters and is based on their original order in the
            host-meta and LRDD documents. For example, the <spanx style='verb'>hub</spanx> link
            obtained from the host-meta link template has a higher priority than the link found in
            the LRDD document because the host-meta link appears before the
            <spanx style='verb'>lrdd</spanx> link.
          </t>
          <t>
            On the other hand, the <spanx style='verb'>author</spanx> link found in the LRDD document
            has a higher priority than the link found in the host-meta document because it appears
            after the <spanx style='verb'>lrdd</spanx> link.
          </t>
        </section>

      </section>

      <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>
        <t>
          This document uses the Augmented Backus-Naur Form (ABNF) notation of <xref target='RFC5234' />.
          Additionally, the following rules are included from <xref target='RFC3986' />: reserved,
          unreserved, and pct-encoded.
        </t>
      </section>

    </section>

    <section title='Obtaining host-meta Documents'>
      <t>
        The client obtains the host-meta document for a given host by sending an HTTP
        <xref target='RFC2616' /> or an HTTPS <xref target='RFC2818' /> GET request to the host for
        the <spanx style='verb'>/.well-known/host-meta</spanx> path, using the default ports
        defined for each protocol (e.g. port 80 for HTTP and port 443 for HTTPS). The scope and
        meaning of host-meta documents obtained via other protocols or ports is undefined.
      </t>
      <t>
        The server MUST support at least one protocol but MAY support both. If both protocols are
        supported, they MUST produce the same document.
      </t>
      <t>
        The decision which protocol is used to obtain the host-meta document have significant
        security ramifications as described in <xref target='security' />.
      </t>
      <figure>
        <preamble>
          For example, the following request is used to obtain the host-meta document for the
          'example.com' host:
        </preamble>
        <artwork>
          <![CDATA[
  GET /.well-known/host-meta HTTP/1.1
  Host: example.com
  ]]>
        </artwork>
      </figure>
      <t>
        If the server response indicates that the host-meta resource is located elsewhere (a 301,
        302, or 307 response status code), the client MUST try to obtain the resource from the
        location provided in the response. This means that the host-meta document for one host
        MAY be retrieved from another host. Likewise, if the resource is not available or does
        not exist (e.g. a 404 or 410 response status codes) using both the HTTP and HTTPS
        protocols, the client should infer that metadata is not available via this mechanism.
      </t>
      <t>
        The host-meta document SHOULD be served with the <spanx style='verb'>application/xrd+xml</spanx>
        media type. [[ media type registration pending ]]
      </t>
    </section>

    <section title='The host-meta Document'>
      <t>
        The host-meta document uses the XRD 1.0 document format as defined by
        <xref target='OASIS.XRD-1.0' />, which provides a simple and extensible XML-based schema
        for describing resources. This specification defines additional processing rules needed to
        describe hosts. Documents MAY include any XRD element not explicitly excluded.
      </t>
      <t>
        The server MAY offer alternative representations of any XRD document it serves (host-meta,
        LRDD, or other XRD-based documents). The client MAY request a particular representation
        using the HTTP <spanx style='verb'>Accept</spanx> request header field. If no
        <spanx style='verb'>Accept</spanx> request header field is included with the request, or if
        the client requests a <spanx style='verb'>application/xrd+xml</spanx> representation, the
        server MUST respond using the REQUIRED XRD 1.0 XML representation described in
        <xref target='format' />.
      </t>
      <t>
        The XRD 1.0 XML representation is the only canonical representation for any XRD document.
        If there is any discrepancy between the content of the XRD 1.0 XML representation and any
        other representation for the same resource, the client MUST only use the XRD 1.0 XML
        representation.
      </t>
      <t>
        Applications using the host-meta document MAY require the server to provide a specific
        alternative representation in addition to the XRD 1.0 XML representation when explicitly
        requested by the client.
      </t>
      <t>
        A JavaScript Object Notation (JSON) XRD 1.0 representation is described in
        <xref target='json' />. It is RECOMMENDED that servers offer the JRD
        representation in addition to the XRD representation.
      </t>

      <section title='XML Document format' anchor='format'>
        <t>
          The host-meta document root MUST be an <spanx style='verb'>XRD</spanx> element. The
          document SHOULD NOT include a <spanx style='verb'>Subject</spanx> element, as at this time
          no URI is available to identify hosts. The use of the <spanx style='verb'>Alias</spanx>
          element in host-meta is undefined and NOT RECOMMENDED.
        </t>
        <t>
          The subject (or "context resource" as defined by <xref target='RFC5988' />)
          of the XRD <spanx style='verb'>Property</spanx> and <spanx style='verb'>Link</spanx>
          elements is the host described by the host-meta document. However, the subject of
          <spanx style='verb'>Link</spanx> elements with a <spanx style='verb'>template</spanx>
          attribute is the individual resource whose URI is applied to the link template as described
          in <xref target='Link element' />.
        </t>

        <section title="The 'Link' Element" anchor='Link element'>
          <t>
            The XRD <spanx style='verb'>Link</spanx> element, when used with the
            <spanx style='verb'>href</spanx> attribute, conveys a link relation between the host
            described by the document and a common target URI.
          </t>
          <figure>
            <preamble>
              For example, the following link declares a common copyright license for the entire
              scope:
            </preamble>
            <artwork>
              <![CDATA[
  <Link rel='copyright' href='http://example.com/copyright' />
]]>
            </artwork>
          </figure>
          <t>
            However, a <spanx style='verb'>Link</spanx> element with a
            <spanx style='verb'>template</spanx> attribute conveys a relation whose context is an
            individual resource within the host-meta document scope, and whose target is constructed
            by applying the context resource URI to the template. The template string MAY contain a URI
            string without any variables to represent a resource-level relation that is identical for
            every individual resource.
          </t>
          <figure>
            <preamble>
              For example, a blog with multiple authors can provide information about each article's
              author by providing an endpoint with a parameter set to the URI of each article. Each
              article has a unique author, but all share the same pattern of where that information
              is located:
            </preamble>
            <artwork>
              <![CDATA[
  <Link rel='author'
   template='http://example.com/author?article={uri}' />
  ]]>
            </artwork>
          </figure>

          <section title='Template Syntax' anchor='template_syntax'>
            <t>
              This specification defines a simple template syntax for URI transformation.
              A template is a string containing brace-enclosed ("{}") variable names marking the
              parts of the string that are to be substituted by the corresponding variable values.
            </t>
            <t>
              Before substituting template variables, values MUST be encoded using UTF-8 and any
              character other than unreserved (as defined by <xref target='RFC3986' />) MUST be
              percent-encoded per <xref target='RFC3986' />.
            </t>
            <t>
              This specification defines a single variable - <spanx style='verb'>uri</spanx> - as
              the entire context resource URI. Protocols MAY define additional relation-specific
              variables and syntax rules, but SHOULD only do so for protocol-specific relation
              types, and MUST NOT change the meaning of the <spanx style='verb'>uri</spanx>
              variable. If a client is unable to successfully process a template (e.g. unknown
              variable names, unknown or incompatible syntax) the parent
              <spanx style='verb'>Link</spanx> element SHOULD be ignored.
            </t>
            <figure>
              <preamble>
                The template syntax ABNF:
              </preamble>
              <artwork>
                <![CDATA[
  URI-Template =  *( uri-char / variable )
  variable     =  "{" var-name "}"
  uri-char     =  ( reserved / unreserved / pct-encoded )
  var-name     =  %x75.72.69 / ( 1*var-char ) ; "uri" or other names
  var-char     =  ALPHA / DIGIT / "." / "_"
  ]]>
              </artwork>
            </figure>
            <figure>
              <preamble>
                For example:
              </preamble>
              <artwork>
                <![CDATA[
  Input:    http://example.com/r?f=1
  Template: http://example.org/?q={uri}
  Output:   http://example.org/?q=http%3A%2F%2Fexample.com%2Fr%3Ff%3D1
  ]]>
              </artwork>
            </figure>
          </section>

        </section>

      </section>

    </section>

    <section title='Processing host-meta Documents'>
      <t>
        Once the host-meta document has been obtained, the client processes its content based on
        the type of information desired: host-wide or resource-specific.
      </t>
      <t>
        Clients usually look for a link with a specific relation type or other attributes. In
        such cases, the client does not need to process the entire host-meta document and all
        linked LRDD documents, but instead, process the various documents in their prescribed order
        until the desired information is found.
      </t>
      <t>
        Protocols using host-meta must indicate whether the information they seek is host-wide or
        resource-specific. For example, "obtain the first host-meta resource-specific link using
        the 'author' relation type". If both types are used for the same purpose (e.g. first look
        for resource-specific, then look for host-wide), the protocol must specify the processing
        order.
      </t>

      <section title='Host-Wide Information'>
        <t>
          When looking for host-wide information, the client MUST ignore any
          <spanx style='verb'>Link</spanx> elements with a <spanx style='verb'>template</spanx>
          attribute, as well as any link using the <spanx style='verb'>lrdd</spanx> relation type.
          All other elements are scoped as host-wide.
        </t>
      </section>

      <section title='Resource-Specific Information'>
        <t>
          Unlike host-wide information which is contained solely within the host-meta document,
          resource-specific information is obtained from host-meta link templates, as well as from
          linked LRDD documents.
        </t>
        <t>
          When looking for resource-specific information, the client constructs a resource
          descriptor by collecting and processing all the host-meta link templates. For each link
          template:

          <list style='numbers'>
            <t>
              The client applies the URI of the desired resource to the template, producing a
              resource-specific link.
            </t>
            <t>
              If the link's relation type is other than <spanx style='verb'>lrdd</spanx>, the
              client adds the link to the resource descriptor in order.
            </t>
            <t>
              If the link's relation type is <spanx style='verb'>lrdd</spanx>:

              <list style='format 3.%d'>
                <t>
                  The client obtains the LRDD document by following the scheme-specific rules
                  for the LRDD document URI. If the document URI scheme is
                  <spanx style='verb'>http</spanx> or <spanx style='verb'>https</spanx>, the
                  document is obtained via an HTTP <spanx style='verb'>GET</spanx> request to
                  the identified URI. If the HTTP response status code is 301, 302, or 307, the
                  client MUST follow the redirection response and repeat the request with the
                  provided location.
                </t>
                <t>
                  The client adds any links found in the LRDD document to the resource
                  descriptor in order, except for any link using the
                  <spanx style='verb'>lrdd</spanx> relation type (processing is limited to a single
                  level of inclusion). When adding links, the client
                  SHOULD retain any extension attributes and child elements if present (e.g.
                  <Property> or <Title> elements).
                </t>
                <t>
                  The client adds any resource properties found in the LRDD document to the
                  resource descriptor in order (e.g. <Alias> or <Property> child
                  elements of the LRDD document <XRD> root element).
                </t>
              </list>
            </t>
          </list>
        </t>
      </section>

    </section>

    <section title='Security Considerations' anchor='security'>
      <t>
        The host-meta document is designed to be used by other applications explicitly "opting-in"
        to use the facility. Therefore, any such application MUST review the specific security
        implications of using host-meta documents. By itself, this specification does not provide
        any protections or guarantees that any given host-meta document is under the control of the
        appropriate entity as required by each application.
      </t>
      <t>
        The metadata returned by the host-meta resource is presumed to be under the control of the
        appropriate authority and representative of all the resources described by it. If this
        resource is compromised or otherwise under the control of another party, it may represent a
        risk to the security of the server and data served by it, depending on the applications
        using it.
      </t>
      <t>
        Applications utilizing the host-meta document for sensitive or security related information
        MUST require the use of the HTTPS protocol and MUST NOT produce a host-meta document using
        other means. In addition, such applications MUST require that any redirection leading to
        the retrieval of a host-meta document also utilize the HTTPS protocol.
      </t>
      <t>
        Since the host-meta document is authoritative for the entire host, not just the authority
        (combination of scheme, host, and port) of the host-meta document server, applications MUST
        ensure that using a host-meta document for another URI authority does not represent a
        potential security exploit.
      </t>
      <t>
        Protocols using host-meta templates must evaluate the construction of their templates as
        well as any protocol-specific variables or syntax to ensure that the templates cannot be
        abused by an attacker. For example, a client can be tricked into following a malicious link
        due to a poorly constructed template which produces unexpected results when its variable
        values contain unexpected characters.
      </t>
    </section>

    <section title='IANA Considerations'>

      <section title="The 'host-meta' Well-Known URI">
        <t>
          This specification registers the <spanx style='verb'>host-meta</spanx> well-known URI in
          the Well-Known URI Registry as defined by <xref target='RFC5785' />.

          <list style='hanging'>
            <t hangText='URI suffix:'>
              host-meta
            </t>
            <t hangText='Change controller:'>
              IETF
            </t>
            <t hangText='Specification document(s):'>
              [[ this document ]]
            </t>
            <t hangText='Related information:'>
              The <spanx style='verb'>host-meta</spanx> documents obtained from the same host using
              the HTTP and HTTPS protocols (using default ports) MUST be identical.
            </t>
          </list>
        </t>
      </section>
      
      <section title="The 'host-meta.json' Well-Known URI">
        <t>
          This specification registers the <spanx style='verb'>host-meta.json</spanx> well-known
          URI in the Well-Known URI Registry as defined by <xref target='RFC5785' />.

          <list style='hanging'>
            <t hangText='URI suffix:'>
              host-meta.json
            </t>
            <t hangText='Change controller:'>
              IETF
            </t>
            <t hangText='Specification document(s):'>
              [[ this document ]]
            </t>
            <t hangText='Related information:'>
              The <spanx style='verb'>host-meta.json</spanx> documents obtained from the same host
              using the HTTP and HTTPS protocols (using default ports) MUST be identical.
            </t>
          </list>
        </t>
      </section>

      <section title="The 'lrdd' Relation Type">
        <t>
          This specification registers the <spanx style='verb'>lrdd</spanx> relation type in the
          Link Relation Type Registry defined by <xref target='RFC5988' />:

          <list style='hanging'>
            <t hangText='Relation Name:'>
              lrdd
            </t>
            <t hangText='Description:'>
              Refers to further information about the link's context, expressed as a LRRD
              ("Link-based Resource Descriptor Document") resource. See [[ this specification ]]
              for information about processing this relation type in host-meta documents. When used
              elsewhere, it refers to additional links and other metadata. Multiple instances
              indicate additional LRRD resources. LRRD resources MUST have an
              <spanx style='verb'>application/xrd+xml</spanx> representation, and MAY have others.
            </t>
            <t hangText='Reference:'>
              [[ This specification ]]
            </t>
          </list>
        </t>
      </section>

    </section>

    <appendix title='JRD Document Format' anchor='json'>
      <t>
        The JRD document format - a general purpose XRD 1.0 represenation - uses the JavaScript
        Object Notation (JSON) format defined in <xref target='RFC4627' />. JRD uses the same
        elements and processing rules described in <xref target='format' />. The JRD format is
        designed to include the same base functionality provided by the XML format with the
        exception of extensibility which is beyond the scope of this specification.
      </t>
      <t>
        The client MAY request a JRD representation using the HTTP
        <spanx style='verb'>Accept</spanx> request header field with value of
        <spanx style='verb'>application/json</spanx>. The server MUST include the HTTP
        <spanx style='verb'>Content-Type</spanx> response header field with value of
        <spanx style='verb'>application/json</spanx>. Any other
        <spanx style='verb'>Content-Type</spanx> value (or lack of) indicates that the server does
        not support the JRD format.
      </t>
      <t>
        Alternatively, the client MAY request a JRD representation by requesting the
        <spanx style='verb'>host-meta.json</spanx> well-known document, by making a GET request for
        <spanx style='verb'>/.well-known/host-meta.json</spanx>, following the same process used
        for <spanx style='verb'>/.well-known/host-meta</spanx>. If the server does not support
        serving a JRD representation on at this location, the server MUST respond with an HTTP 404
        (Not Found) status code.
      </t>
      <t>
        XRD elements are serialized into a JSON structure as follows:
        
        <list style='symbols'>
          <t>
            The XML document declaration and <spanx style='verb'>XRD</spanx> element are discarded.
          </t>
          <t>
            The <spanx style='verb'>Subject</spanx> element is included as name/value pair with the
            name 'subject', and value included as a string.
          </t>
          <t>
            The <spanx style='verb'>Expires</spanx> element is included as name/value pair with the
            name 'expires', and value included as a string.
          </t>
          <t>
            <spanx style='verb'>Alias</spanx> elements are included as a single name/value pair
            with the name 'alias', and value a string array containing the values of each element
            in order.
          </t>
          <t>
            <spanx style='verb'>Property</spanx> elements are included as a single object with the
            name 'properties', and value an object with each element included as a name/value pair
            with the value of the <spanx style='verb'>type</spanx> attribute as name, and element
            value included as a string value. The values of properties with empty values (i.e.
            using the REQUIRED <spanx style='verb'>xsi:nil='true'</spanx> attribute) are included
            as <spanx style='verb'>null</spanx>. If more than one
            <spanx style='verb'>Property</spanx> element is present with the same
            <spanx style='verb'>type</spanx> attribute, only the last instance is included.
          </t>
          <t>
            <spanx style='verb'>Link</spanx> elements are included as a single name/value pair with
            the name 'links' and with each element included as an object. Each attribute is
            included as name/value pair with the attribute name as name, and value included as a
            string.
          </t>
          <t>
            <spanx style='verb'>Link</spanx> child <spanx style='verb'>Property</spanx> elements
            are included using the same method as XRD-level <spanx style='verb'>Property</spanx>
            elements using a name/value pair inside the link object.
          </t>
          <t>
            <spanx style='verb'>Link</spanx> child <spanx style='verb'>Title</spanx> elements are
            included as a single object with the name 'titles', and value an object with each
            element included as a name/value pair with the value of the
            <spanx style='verb'>xml:lang</spanx> attribute as name, and element value included as a
            string value. The names of elements without a <spanx style='verb'>xml:lang</spanx>
            attribute are added with the name 'default'. If more than one
            <spanx style='verb'>Title</spanx> element is present with the same (or no)
            <spanx style='verb'>xml:lang</spanx> attribute, only the last instance is included.
          </t>
          <t>
            The conversion of any other element is left undefined.
          </t>
        </list>
      </t>
      <figure>
        <preamble>
          For example, the following XRD document:
        </preamble>
        <artwork>
          <![CDATA[
  <?xml version='1.0' encoding='UTF-8'?>
  <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
       xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
 
    <Subject>http://blog.example.com/article/id/314</Subject>
    <Expires>2010-01-30T09:30:00Z</Expires>
 
    <Alias>http://blog.example.com/cool_new_thing</Alias>
    <Alias>http://blog.example.com/steve/article/7</Alias>
 
    <Property type='http://blgx.example.net/ns/version'>1.2</Property>
    <Property type='http://blgx.example.net/ns/version'>1.3</Property>
    <Property type='http://blgx.example.net/ns/ext' xsi:nil='true' />
 
    <Link rel='author' type='text/html'
          href='http://blog.example.com/author/steve'>
      <Title>About the Author</Title>
      <Title xml:lang='en-us'>Author Information</Title>
      <Property type='http://example.com/role'>editor</Property>
    </Link>
 
    <Link rel='author' href='http://example.com/author/john'>
      <Title>The other guy</Title>
      <Title>The other author</Title>
    </Link>
 
    <Link rel='copyright'
          tempalte='http://example.com/copyright?id={uri}' />
  </XRD>
]]>
        </artwork>
      </figure>
      <figure>
        <preamble>
          Is represented by the following JRD document:
        </preamble>
        <artwork>
          <![CDATA[
  {
    "subject":"http://blog.example.com/article/id/314",
    "expires":"2010-01-30T09:30:00Z",
    
    "aliases":[
      "http://blog.example.com/cool_new_thing",
      "http://blog.example.com/steve/article/7"],
      
    "properties":{
      "http://blgx.example.net/ns/version":"1.3",
      "http://blgx.example.net/ns/ext":null
    },
    
    "links":[
      {
        "rel":"author",
        "type":"text/html",
        "href":"http://blog.example.com/author/steve",
        "titles":{
          "default":"About the Author",
          "en-us":"Author Information"
        },
        "properties":{
          "http://example.com/role":"editor"
        }
      },
      {
        "rel":"author",
        "href":"http://example.com/author/john",
        "titles":{
          "default":"The other author"
        }
      },
      {
        "rel":"copyright",
        "template":"http://example.com/copyright?id={uri}"
      }
    ]
  }
]]>
        </artwork>
        <postamble>
          Note that the <spanx style='verb'>Subject</spanx> and <spanx style='verb'>Alias</spanx>
          elements are NOT RECOMMENDED in the context of host-meta documents, and are included in
          the example for completeness only.
        </postamble>
      </figure>
    </appendix>

    <appendix title='Acknowledgments'>
      <t>
        The authors would like to acknowledge the contributions of everyone who provided feedback
        and use cases for this specification; in particular, Dirk Balfanz, DeWitt Clinton,
        Eve Maler, Breno de Medeiros, Brad Fitzpatrick, James Manger, Will Norris, Mark Nottingham,
        John Panzer, Drummond Reed, and Peter Saint-Andre.
      </t>
    </appendix>

  </middle>

  <back>

    <references title='Normative References'>

      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.2818.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5785.xml'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml/reference.RFC.5988.xml'?>

      <reference anchor='OASIS.XRD-1.0' target='http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html'>
        <front>
          <title>Extensible Resource Descriptor (XRD) Version 1.0</title>
          <author initials='E.H' surname='Hammer-Lahav' fullname='Eran'>
            <organization>Yahoo!</organization>
          </author>
          <author initials='W.N' surname='Norris' fullname='Will Norris'>
            <organization>Internet2</organization>
          </author>
        </front>
        <format type='HTML' target='http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html' />
      </reference>

    </references>

  </back>

</rfc>

PAFTECH AB 2003-20262026-04-23 19:34:20