<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd"
[

<!ENTITY RFC3958 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3958.xml'>

<!ENTITY RFC3986 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'>

<!ENTITY RFC4848 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4848.xml'>

<!ENTITY RFC5988 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5988.xml'>

<!ENTITY RFC7230 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7230.xml'>
   
<!ENTITY I-D.faltstrom-uri PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.faltstrom-uri.xml'>
]>
<?rfc toc="yes"?>
<rfc category="std" docName="draft-newton-link-rr-00" ipr="trust200902">
    <front>
        <title abbrev="LINK RR">The LINK DNS Resource Record</title>
        <author fullname="Andrew Lee Newton" initials="A.L." surname="Newton">
            <organization abbrev="ARIN">American Registry for Internet Numbers</organization>
            <address>
                <postal>
                    <street>3635 Concorde Parkway</street>
                    <city>Chantilly</city>
                    <region>VA</region>
                    <country>US</country>
                    <code>20151</code>
                </postal>
                <email>andy@arin.net</email>
                <uri>http://www.arin.net</uri>
            </address>
        </author>
        <date/>
        <abstract>
            <t>This document describes a DNS resource record for holding a URI and meta-data
               about the URI useful in constructing web links (as described in RFC 5988).
               The name of this resource record is LINK.</t>
        </abstract>
    </front>
    <middle>
        <section title="Introduction" anchor="introduction">
            <t> 
                <xref target="RFC5988"></xref> describes a typed link framework for relating
                resources on the Web (and more generally on the Internet). It does this by specifying
                a formal syntax for a Link header to be used in <xref target="RFC7230">HTTP</xref>
                and by establishing an IANA registry for link relationships.
            </t>
            <t>
                The LINK resource record described in this document re-uses the tags and values of the HTTP
                Link header described in <xref target="RFC5988"></xref> but with a simplified syntax
                for compactness and use of multiple records in a DNS resource record set (RRSET). 
                By making link information
                available in the DNS, applications may perform link mapping outside of HTTP. Additionally,
                since the Link data uses other common application building blocks such as <xref target="RFC3986">URIs</xref> and
                media types, the use of this link information can be much broader than HTTP with
                other application protocols.
            </t>
            <figure anchor="simple_example">
                <preamble>
                    The following is a simple LINK example which links "icon.png" as
                    the icon for example.com.
                </preamble>
                <artwork xml:space="preserve">
example.com. IN LINK "http://example.com/icon.png r=icon"
                </artwork>
            </figure>
            <figure anchor="nofollow_example">
                <preamble>
                    The following is a LINK example instructing search engines
                    not to follow a specific link.
                </preamble>
                <artwork xml:space="preserve">
example.com. IN LINK "http://example.com/ r=nofollow"
                </artwork>
            </figure>
            <figure anchor="language_example">
                <preamble>
                    In the following example, links are given for example.com
                    based on a natural language preference.
                </preamble>
                <artwork xml:space="preserve">
example.com.
IN LINK "http://en.example.com/ hl=en"
IN LINK "http://es.example.com/ hl=es"
IN LINK "http://fr.example.com/ hl=fr"
                </artwork>
            </figure>
            <figure>
                <preamble>
                    In the following example, links are given for a RESTful service
                    in both an XML and JSON format.
                </preamble>
                <artwork xml:space="preserve">
restful.example.com.
IN LINK "http://example.com/rest-xml t=application/foo+xml"
IN LINK "http://example.com/rest-json t=application/foo+json"
                </artwork>
            </figure>
        </section>
        <section title="Format" anchor="format">
            <t>
                The format of the LINK resource record is the same as the TXT resource record,
                except the resource record name is LINK. The resource record data consists of
                character-strings. When these character-strings are concatenated they take the
                form of:
                <list>
                    <t>URI tag1=value1 tag2=value2 ...</t>
                </list>
            </t>
            <t>
                The ABNF for the final character string concatenation is:
            </t>
            <figure>
                <artwork xml:space="preserve">
tagchar     = ( DIGIT / ALPHA )
tag         = *tagchar
quotedvalue = %x27 *(VCHAR / WSP ) %x27
tagvalue    = tag "=" VCHAR / quotedvalue
linkdata    = URI 1*SP tagvalue *( 1*SP tagvalue )
              ; URI is defined in RFC 3986
                </artwork>
            </figure>
            <t>
                Each tag value pair is separated by space, and the values do not need to be
                quoted unless they contain space characters. Tags are defined in
                <xref target="tags"></xref>.
            </t>

        </section>
        <section anchor="tags" title="Tags">
            <t>
                This document defines the following tags for the LINK RR. Future specification
                of tags is possible, therefore applications MUST ignore unknown tags. All of the
                tags below reference a tag from <xref target="RFC5988"></xref>.
                <list style="numbers">
                    <t>r - matches "rel"</t>
                    <t>v - matches "rev"</t>
                    <t>hl - matches "hreflang"</t>
                    <t>m - matches "media"</t>
                    <t>t - matches "type"</t>
                    <t>tt - matches "title", only one may appear per LINK record</t>
                    <t>tl - refers the language of the title, only one may appear per LINK record
                    and must be accompanied by a tl tag in the same LINK record</t>
                </list>
            </t>
            <t>
                Becaue multiple LINK records may be specified, the restrictions upon the tt and tl
                tags gives the same functionality as the title and title* tags from <xref target="RFC5988"></xref>.
            </t>
        </section>
        <section title="IANA Considerations" anchor="iana_considerations">
           <t>
                The IANA will need to assign a value for the LINK record type.
           </t>
            
        </section>
        <section title="Security Considerations" anchor="security_considerations">
            <t>
                TBD
            </t>
        </section>
        <section title="Internationalization Considerations"
            anchor="internationalization_considerations">
            <t>
                The LINK record allows referenced links and titles to links to be given
                language tags with the tl and hl record tags, respectively.
            </t>
        </section>
        <section title="Privacy Considerations" anchor="privacy_considerations">
            <t>
                Information in the DNS is publicly visible to all parties on the Internet.
                While visibility of the HTTP Link header can be constrained via HTTP
                access methods, visibility of the LINK record cannot. Care should be taken
                that information available in an HTTP Link header is appropriate for
                public visibility once translated into a LINK record.
            </t>
        </section>

    </middle>
    <back>
        <references title="Normative References">  
            &RFC3986;
            &RFC5988; 
            &RFC7230;           
        </references>
        <references title="Informational References">
            &I-D.faltstrom-uri;
            &RFC3958;
            &RFC4848;
        </references>
        <section title="Design Considerations">
            <t>
                In designing the format for the LINK record, the author considered
                a record specific RDATA format and presentation format using a
                simple tag-length-value (TLV) construction. Such a design has the
                advantage of mapping the same <xref target="RFC5988"></xref> tags
                to numeric codes and potentially avoids escaping issues with
                quoted strings.
            </t>
            <t>
                The decision to use space separated key-value pairs inside
                character strings was instead chosen to better aid adoption. With
                this method, libraries need only re-use the TXT record construct
                at the bare minimum, and in more complete cases couuld offer a
                richer interface while using simple space delimited token parsing of
                the character strings.
            </t>
            <t>
                In the event that this design is found to be problematic or
                lacking the ease-of-adoption desired, the author believe moving
                to a TLV design is semantically compatible and easily achieved.
            </t>
            <t>
                Re-use of the exact syntax of the Link header was also considered.
                However, that syntax is not as simple as desired because of the nature
                of how headers are embedded in HTTP and the need for backwards
                compatibility with a previously deprecated version of the Link
                header. Therefore a simplified, space delimited syntax is used.
            </t>
        </section>
        <section title="Relevance to U-NAPTR and the URI Record Type">
            <t>
                Placement of URIs in the DNS is not a new idea, but it has yet
                to have found significant usage.
            </t>
            <t>
                <xref target="RFC4848">U-NAPTR</xref> is a method for using NAPTR
                records to resolve URIs in the DNS using application
                service keywords and application protocol or transport
                protocol keywords.
            </t>
            <t>
                <xref target="I-D.faltstrom-uri"></xref> defines the URI resource
                record which can be used without further domain name qualification
                or with NAPTR records as described by <xref target="RFC3958"></xref>
                to achieve the same service/protocol keyword resolution as
                <xref target="RFC4848">U-NAPTR</xref>.
            </t>
            <t>
                In practice, the need for service/protocol keyword resolution by
                applications is usually irrelevant and can be redundant or conflict
                with the scheme of the target URI. Additionally, both <xref target="RFC4848">U-NAPTR</xref>
                and <xref target="I-D.faltstrom-uri"></xref> offer a weight and order
                sorting mechanism which is seldom ever needed but adds confusion to
                the administration of these DNS resource records.
            </t>
            <t>
                The approach used by this document is to offer applications the
                ability to reference information about a URI and the target of the URI
                as is commonly used on the Internet, especially in web-based protocols.
            </t>
        </section>
        <section title="Changelog">
            <t>
                <list style="hanging">
                    <t hangText="Initial -00">Booyah!</t>
                </list>
            </t>
        </section>
    </back>
</rfc>
