<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.22 (Ruby 3.3.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bormann-asdf-sdftype-link-04" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.24.0 -->
  <front>
    <title abbrev="sdfType for Links">An sdfType for Links</title>
    <seriesInfo name="Internet-Draft" value="draft-bormann-asdf-sdftype-link-04"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2024" month="December" day="06"/>
    <area>Applications and Real-Time</area>
    <workgroup>ASDF WG</workgroup>
    <keyword>IoT</keyword>
    <keyword>Link</keyword>
    <keyword>Web Linking</keyword>
    <abstract>
      <?line 45?>

<t>This document defines and registers an sdfType "link" for the
Semantic Definition Format (SDF) for Data and Interactions of Things
(draft-ietf-asdf-sdf).</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-bormann-asdf-sdftype-link/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        A Semantic Definition Format for Data and Interactions of Things Working Group mailing list (<eref target="mailto:asdf@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/asdf/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/asdf/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/cabo/sdftype-link"/>.</t>
    </note>
  </front>
  <middle>
    <?line 51?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The Semantic Definition Format for Data and Interactions of Things
(SDF, <xref target="I-D.ietf-asdf-sdf"/>) is a format for domain experts to use in the creation
and maintenance of data and interaction models in the Internet of
Things.</t>
      <t>A common data type that occurs in the modeling of IoT devices is the
<em>link</em>.
<xref target="RFC8288"/> defines the concept of Web Linking, which, apart from the
target URI that any link will contain, can provide additional parameters, such
as the "link relation type" that explains the relationship expressed
by the link, as well as "target attributes" that provide additional
information about the target of the link (without a need to
"dereference", i.e., follow, the link).</t>
      <t>This document defines and registers an sdfType "link" for the Semantic
Definition Format.
This type models an abstract "serialization" <xref target="RFC8288"/> of a link, in a
way that is compatible with the way SDF maps information models to its
data modeling language.</t>
      <section anchor="conventions-and-definitions">
        <name>Conventions and Definitions</name>
        <t>The definitions of <xref target="RFC6690"/>, <xref target="RFC8288"/>, and <xref target="I-D.ietf-asdf-sdf"/> apply.</t>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in <xref target="BCP14"/> (<xref target="RFC2119"/>) (<xref target="RFC8174"/>) when, and only when, they
appear in all capitals, as shown here.</t>
        <?line -18?>

</section>
    </section>
    <section anchor="the-sdftype-link">
      <name>The sdfType "link"</name>
      <t>The sdfType "link" is intended to be used with the SDF "type" of "object".
The members of that object are strings that are named the same as the
link parameter (attribute) names.
The special parameter name "href" is used to express the link target.
(Parameter names specific to the Constrained RESTful Environment
(CoRE) are also discussed in <xref target="RFC9423"/>.)</t>
      <t>Note that attribute names and relation type names are case-insensitive
in <xref target="RFC8288"/>.
Strings that are case-insensitive in <xref target="RFC8288"/> <bcp14>MUST</bcp14> be in their
lowercase form when used in this specification.</t>
      <t>An example for the instance of a link is provided in <xref section="5" sectionFormat="of" target="RFC6690"/>:</t>
      <sourcecode type="link-format"><![CDATA[
   </sensors/temp>;rt="temperature-c";if="sensor",
]]></sourcecode>
      <t>To hold a link like this, we could describe an SDF affordance that is
specific on the target attributes above, but does not contain
instance-specific (run-time) information on the actual URI that points
to the link target.
An sdfProperty for that could look like:</t>
      <sourcecode type="sdf"><![CDATA[
{
 "sdfProperty": {
  "temp-c-link": {
   "type": "object",
   "sdfType": "link",
   "properties": {
     "href": { "type": "string"},
     "rt": { "type": "string", "const": "temperature-c"},
     "if": { "type": "string", "const": "sensor"}
   }
  }
 }
}
]]></sourcecode>
    </section>
    <section anchor="discussion">
      <name>Discussion</name>
      <t>Links play an important role in SDF modeling both during definition
time (for adding information to a model, such as in <tt>sdfRef</tt>) and
during run time (for making links to instances into a subject of data
and interaction modeling).
The present document is an early attempt at addressing the run-time
usage of links, in particular links that fit the Web Linking <xref target="RFC8288"/>
abstractions.
A related draft <xref target="I-D.laari-asdf-relations"/> addresses definition-time links, but does
seem to touch modeling run-time use of links as well (e.g., by
discussing "writable" link relations).</t>
      <t>Not all links used in ecosystems are based on URIs.
E.g., OMA has "object links", which are basically pairs of numbers (object/instance).
These ecosystem links may have some structure that should be modeled
in the SDF model (e.g., where the object id part of a link always has
to have a specific value).
This structure can be mapped into URI strings using some convention,
e.g., an OMA object link could be <tt>oma-object:3303:0</tt> (where
<tt>oma-object</tt> is placeholder for a URI scheme to be defined).
However, burying structural components of the ecosystem-specific link
in a string syntax makes it hard to access and control those
components from the model.</t>
      <t>TODO: Examples are needed to show how the OCF collection pattern is
addressed by the current specification.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The security considerations of <xref target="RFC8288"/> apply in a general way,
although modeling a link as a datatype does not incur all of the
security considerations that will apply to actually interchanging
these links.</t>
      <t>(TODO)</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>// RFC Ed.: please replace RFC XXXX with this RFC number and remove this note.</t>
      <t>IANA is requested to register the sdfType "link" in the "sdfType Values" sub-registry in
the "SDF Parameters" registry, with the following completion for the
registration template:</t>
      <table anchor="sdftype-r">
        <name>Registration for sdfType "link"</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Description</th>
            <th align="left">type</th>
            <th align="left">JSON Representation</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">link</td>
            <td align="left">A Web Link <xref target="RFC8288"/></td>
            <td align="left">object</td>
            <td align="left">object members for link attributes</td>
            <td align="left">RFCXXXX</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="I-D.ietf-asdf-sdf">
          <front>
            <title>Semantic Definition Format (SDF) for Data and Interactions of Things</title>
            <author fullname="Michael Koster" initials="M." surname="Koster">
              <organization>KTC</organization>
            </author>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann">
              <organization>Universität Bremen TZI</organization>
            </author>
            <author fullname="Ari Keränen" initials="A." surname="Keränen">
              <organization>Ericsson</organization>
            </author>
            <date day="28" month="February" year="2024"/>
            <abstract>
              <t>   The Semantic Definition Format (SDF) is a format for domain experts
   to use in the creation and maintenance of data and interaction models
   that describe Things, i.e., physical objects that are available for
   interaction over a network.  An SDF specification describes
   definitions of SDF Objects/SDF Things and their associated
   interactions (Events, Actions, Properties), as well as the Data types
   for the information exchanged in those interactions.  Tools convert
   this format to database formats and other serializations as needed.


   // The present revision (-18) adds security considerations, a few
   // editorial cleanups, discusses JSON pointer encodings, and adds
   // sockets to the CDDL for easier future extension.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-asdf-sdf-18"/>
        </reference>
        <reference anchor="RFC8288">
          <front>
            <title>Web Linking</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <date month="October" year="2017"/>
            <abstract>
              <t>This specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").</t>
              <t>It also defines the serialisation of such links in HTTP headers with the Link header field.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8288"/>
          <seriesInfo name="DOI" value="10.17487/RFC8288"/>
        </reference>
        <referencegroup anchor="BCP14" target="https://www.rfc-editor.org/info/bcp14">
          <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
            <front>
              <title>Key words for use in RFCs to Indicate Requirement Levels</title>
              <author fullname="S. Bradner" initials="S." surname="Bradner"/>
              <date month="March" year="1997"/>
              <abstract>
                <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
              </abstract>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
          </reference>
          <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
            <front>
              <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
              <author fullname="B. Leiba" initials="B." surname="Leiba"/>
              <date month="May" year="2017"/>
              <abstract>
                <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
              </abstract>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
          </reference>
        </referencegroup>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC6690">
          <front>
            <title>Constrained RESTful Environments (CoRE) Link Format</title>
            <author fullname="Z. Shelby" initials="Z." surname="Shelby"/>
            <date month="August" year="2012"/>
            <abstract>
              <t>This specification defines Web Linking using a link format for use by constrained web servers to describe hosted resources, their attributes, and other relationships between links. Based on the HTTP Link Header field defined in RFC 5988, the Constrained RESTful Environments (CoRE) Link Format is carried as a payload and is assigned an Internet media type. "RESTful" refers to the Representational State Transfer (REST) architecture. A well-known URI is defined as a default entry point for requesting the links hosted by a server. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6690"/>
          <seriesInfo name="DOI" value="10.17487/RFC6690"/>
        </reference>
        <reference anchor="I-D.laari-asdf-relations">
          <front>
            <title>Extended relation information for Semantic Definition Format (SDF)</title>
            <author fullname="Petri Laari" initials="P." surname="Laari">
              <organization>Ericsson</organization>
            </author>
            <date day="20" month="June" year="2024"/>
            <abstract>
              <t>   The Semantic Definition Format (SDF) base specification defines set
   of basic information elements that can be used for describing a large
   share of the existing data models from different ecosystems.  While
   these data models are typically very simple, such as basic sensors
   definitions, more complex models, and in particular bigger systems,
   benefit from ability to describe additional information on how
   different definitions relate to each other.  This document specifies
   an extension to SDF for describing complex relationships in class
   level descriptions.  This specification does not consider instance-
   specific information.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-laari-asdf-relations-03"/>
        </reference>
        <reference anchor="RFC9423">
          <front>
            <title>Constrained RESTful Environments (CoRE) Target Attributes Registry</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="April" year="2024"/>
            <abstract>
              <t>The Constrained RESTful Environments (CoRE) specifications apply web technologies to constrained environments. One such important technology is Web Linking (RFC 8288), which CoRE specifications use as the basis for a number of discovery protocols, such as the Link Format (RFC 6690) in the Constrained Application Protocol's (CoAP's) resource discovery process (Section 7.2 of RFC 7252) and the Resource Directory (RD) (RFC 9176).</t>
              <t>Web Links can have target attributes, the names of which are not generally coordinated by the Web Linking specification (Section 2.2 of RFC 8288). This document introduces an IANA registry for coordinating names of target attributes when used in CoRE. It updates the "RD Parameters" IANA registry created by RFC 9176 to coordinate with this registry.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9423"/>
          <seriesInfo name="DOI" value="10.17487/RFC9423"/>
        </reference>
      </references>
    </references>
    <?line 192?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Discussions in the OneDM liaison organization shaped this proposal.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA6VY63IbtxX+j6dA138km0tbl7gyEyehJTlWx5ZcSW6aNp0x
uAuSqJaLLYCVwljy0/RN+mL9zgF2SUpupjPRjKRdXA7O5TvnfNg8z8X1SO4J
EUyo9EiOa+nL6eWy0XJqnXxr6isv1GTiNJY9nClU0DPrlpgLpfDBabUYyZPj
y9eisLXXtW/9SAbXaiFKW9RqgTNKp6Yhn1i3UHWdK0jN8RsgOa8gNa8g1AdR
t4uJdiNR4nUkFESPZDZumsrgVAPpUtWlPNeqyi/NQmfixrqrmbNtAzMujl7L
H38QV3qJ0XIkZC5P7CX9I8Xp/496ws+mnolrXbc4Q8q0PRvLCw3tginkkZ6a
2tCB8jWpHNj8IxUUn39SB+1UERWyU3k5h0CfQdZCmQqiyL7vjQ7ToXUzGp+Z
MG8nmCnUxD5dtzwTQqg2zC2szrEyuutQOR90LV9Fh2EcgkbyQ22utfMm/Off
Qb5yeoEll387wTSFQYeRfG99mKpiLvf2nu3vP8NMYQJCFRfTqy0h/yjfPdj7
6gW/t3WgYP6g6aglhpq5rbHmyf6LfH93J9/dOcif773Y3cGUjgaSFd+HXw2Z
J0TNLoJm5M2T/GhIlvcxZghh4vz14cHuwcFIktVCmHq6vg2zz5+/eBZn8ziV
pFVKORPFOV1FGLBQvMWdL/Z390ZSheCEyPNcqgncgfgIgch4CRC2MD7IksKq
I4acnhm42NFbD/KMI8LBDnMtfgMPWwDb9v+DCrEVob/hk+1hVHRhyrJCmjyi
zc6WLe8mtfXvBKMgBQfy0yc67u5uW8IPSk5X+0uLUNZS/9JoF7wMVrZeS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